Overview

This page documents the python script used to create a constellation file for the portable target board survey. The script’s features and workflow are documented here.

The purpose of this tool is to create a single constellation file from the surveyed points on the portable target boards. For more information on how to use and survey the portable target boards, click here.


Features

Input

  • Takes Survey file generated specifically for portable boards.

Data Checking

  • Checks for file existence
  • User inquiry for which file to use
  • Error reporting on screen
  • Reports which files are missing and required

Flexibility

  • Automatically sorts surveyed data points for portable targets
    • So surveying targets in a specific order is not required
  • Only requires source survey files for portable boards that have been surveyed
  • Requests user input if more than one *.txt file is present in directory
    • Will not read portable target survey files as input files for script
  • Does not require surveying all portable target boards to generate output constellation file

Output

  • Filename.cfg
    • The output constellation which will be sent to the Intersense Camera
    • This file becomes the source that is used to automatically generate the cones file for camera registration: click here for more info
  • Filename_AdditionalSurveyPoints.txt
    • This file contains a list of all points that are not

Required Files

Python Script

Download the latest version of the python script here:

Survey Files

This python script does require some be present in order to operate properly. One feature of this tool is that it will report to you which files it needs.

All files should be located in the same directory as the python script! The following unique Portable Board Source Files (from Board A – Board P) are available here:

  1. “PortableTargetSurveyFiles.zip” <— File available for download
    1. This file contains: “Floor_Grid_[A-P].txt
  2. “SurveyFile.txt” <— Generated by Total Station


How to Use

  1. Make sure all files are in the same directory!
  2. Double click the Lightcraft_PortableTargetSurveyConverter.py
  3. If everything is in the proper location it will generate a .cfg file with the same name as the survey file
However, not all things go according to plan, so here are some use case scenarios and how the code handles each scenario

Scenario 1: No Survey File

The error is reported and the script stops running.

Scenario 2: No Floor_Grid_A.txt Survey File in Directory when Needed

Sometimes, files get misplaced. In the case where a survey calls for Portable Target Board A, but it isn’t present in the directory, the script does this:

The script recognizes that the survey file requires the “Floor_Grid_A.txt” file but that it is missing from the directory. In this case the script generates an error that requires the user to press “Enter” before continuing.

Though it didn’t generate the .cfg file, it will still generate an Additional Survey Points file if it finds any non-target board surveyed points.

Scenario 3: Too many possible .txt files as Survey Input

Now the script will recognize that there are multiple choices of survey files to choose from and will present an ASCII menu for you to choose the proper *.txt from.

Simply type the menu number of the .txt file you would like to use!

This menu will not break if a letter, or number outside of the menu range is pressed.