NeBula-Autonomy / LOCUS

Robust Lidar Odometry System
MIT License
352 stars 48 forks source link

LOCUS maximum accuracy mode for GT trajectory #64

Closed Telios closed 9 months ago

Telios commented 9 months ago

Hi, I want to create a ground truth trajectory with LOCUS. I already managed to sucessfully load a prior scanned map into LOCUS and record the odometry msgs for further use with evo. Are there some parameters other than the b_run_with_gt_point_cloud and b_add_keyframes_enabled that have to be changed for LOCUS to run at maximal accuracy sacrificing real-time, as mentioned in the odometry dataset? Thank you in advance!

BenjaminMorrell commented 9 months ago

Thanks for your question Telios. The two settings you mention are the most important. For the reference of others looking to do the same:

For the tuning mentioned in the readme, it is a bit of an iterative process for the specific dataset you are working with. Some tuning factors to consider include.

  1. Try increasing the number of points coming out of the filter. The relationship here between more points and better results wasn't that direct from our experience, but if you have a nice ground truth scanned map, then I would expect more points to help. Set this to a higher number.
  2. Adjust the GICP parameters for the scan-to-map step here. I would start with increasing iterations so that never limits it. Depending on your scan resolution and filtering settings of the scans, you may want to decrease corr_dist here, so points need to be closer to be considered matches (avoiding potentially incorrect matches). You might consider looking at decreasing tf_epsilon if that is causing exits from the optimization, but I don't think that is likely to make a large difference.
  3. Depending on your data quality, remove any data integration (set this to 0) - to just prioritize the lidar data. If you trust your calibration to IMU or other odometry source, then leave it on. We tended to bias toward the map being the source of truth, which is only linked with lidar - hence we ignored other sensor sources for the ground truth generation.
  4. Definitely try running at a slower speed (rosbag play filename.bag -r 0.1 for instance)
  5. You might want to increase the lidar queue size (here) depending on the rate that you are running, to make sure you don't drop any scans (it will just delay the output pose, which is fine for this).

Other than these, there may be more fine adjustment of the GICP parameters in here, but hopefully you don't need that.

Telios commented 9 months ago

Thank you very much for this detailed answer! This will definetly improve the accuracy of my GT trajectory. You guys made an awesome project!