\page graphbag Graph Bag
The graph bag package provides several tools for measuring localization performance as described below.
Graph bag simulates localization using a saved bagfile. Rather than relying on rosbag play, it loads measurements directly and greatly decreases runtime. To accurately simulate measurement delays and drops, the LiveMeasurementSimulator class is provided along with a config file to provide delays and minimum spacing between measurements. Graph bag saves results to a new bag file that can be processed by the plot_results_main.py script into a pdf showing information such as poses estiamtes, velocity estimates, bias estiates, covariances, and more.
The bag imu filterer enables the testing of imu filters written in c++. It parses a bag file and loads a c++ imu filter, then saves the filtered data to a new bag file. The filtered data can be plotted and analyzed by the imu_analyzer script.
The bag sweep tool runs the graph bag tool in parallel on multiple bag files. It takes config file with bagnames, map names, and robot configs and produces pdfs and result bagfiles for each entry. Example config file:
/home/bag_name.bag /home/map_name.map /mgt/img_sampler/nav_cam/image_record /home/astrobee/astrobee config/robots/bumble.config iss false
/home/bag_name_2.bag /home/map_name.map /mgt/img_sampler/nav_cam/image_record /home/astrobee/astrobee config/robots/bumble.config iss false
Example bag sweep command:
rosrun graph_bag bag_sweep.py /home/bag_sweep_config.csv /home/output_dir
This is a simple tool to check for large gaps in imu or image data in a bagfile.
The imu analyzer tool plots imu data and also filtered imu data. It can use python filtering tools to lowpass filter imu data at a certain cutoff frequency, or it can use a provided bag file with filtered imu data and compare this against a bag file with unfiltered data. Data is plotted in its raw form and also after being passed through an FFT to show its frequency response.
Merge bags looks for bag files in the current directory with a provided name prefix and merges these into a single bag file. Bags are assumed to be numbered and are merged in numerical order.
Generates localization results for a provided bagfile. See 'rosrun graph_bag run_graph_bag_and_plot_results.py -h' for further details and usage instructions.
Generates groundtruth map and bagfile for a given bagfile. See 'rosrun graph_bag make_groundtruth.py -h' for further details and usage instructions.
Generates groundtruth map for a given bagfile. See 'rosrun graph_bag make_groundtruth.py -h' for further details and usage instructions.
Creates groundtruth in parallel for a set of bagfiles. See 'rosrun graph_bag groundtruth_sweep.py -h' for further details and usage instructions.