For better evaluation of the system we use the simulated environment where the optical flow and IMU data is generated from the ground truth by adding noise.
**Note:** The path to calibration and configuration files used here works for the APT installation. If you compile from source specify the appropriate path to the files in [data folder](/data/).
The system processes the marginalization data and extracts the non-linear factors from them. Roll-pitch and relative-pose factors are initially added to the system. One way to verify that they result in gravity-aligned map is the following
*`optimize` runs the optimization
*`rand_inc` applies a random increment to all frames of the system. If you run the `optimize` until convergence afterwards, and press `align_svd` the alignment transformation should only contain the rotation around Z axis.
*`rand_yaw` applies an increment in yaw to all poses. This should not change the error of the optimization once is have converged.
*`setup_points` triangulates the points and adds them to optimization. You should optimize the system again after adding the points.
For comparison we also provide the `basalt_mapper_sim_naive` executable that has the same parameters. It runs a global bundle-adjustment on keyframe data and inserts pre-integrated IMU measurements between keyframes. This executable is included for comparison only.