FlightGoggles : Troubleshooting Python Interface

Debugging tools

FlightGoggles environment provides some functions to visualize the current vehicle and camera’s state. All vehicle’s states can be plotted using plot_state() function. plot_state_camera() will plot the lastest camera image, and plot_state_video() will return the animation made of logged camera images. The vehicle’s log files can be saved with save_logs().

 - plot_state(vehicle_id, attribute=None)
 - plot_state_camera(camera_id=None)
 - plot_state_video(flag_save=False, filename="video", dpi=400)
 - save_logs(vehicle_id=None, save_dir="data/")

Debugging FlightGoggles Renderer

We provide a script to debug FlightGoggles Renderer. Utilizing the following script, users can manually change the camera position with keyboard control. WS keys control the height, AD keys control the yaw, and JKLI keys control x, y position. Users can change the unit of position control input using 12 key, and the unit of yaw control using 34 keys.

python apps/debug_env.py

Generating video from a log file

Users can generate a video of the vehicle from its log file using the following script. Replace the “PATH_TO_LOG_FILE” with the path to your log file, and "OUTPUT_FILE_NAME.avi" with the file name you want. The log file can be generated by save_logs() function.

python apps/log2video.py -f "PATH_TO_LOG_FILE" -o "OUTPUT_FILE_NAME.avi"