This fork contains lightweight (no GUI) ROS2 implementation of the Traj-LO repository by @kevin2431 and the paper for trajectory estimation.
Tested and successfully run on ROS2 Humble on Ubuntu 22.04.
mkdir -p ros2_ws/src && cd ros2_wsgit clone --recursive https://github.com/bilgineroral/Traj-LO.git ./src/Traj-LO./src/Traj-LO/src/scripts/install_deps.shsource /opt/ros/humble/setup.sh(adjust this to your ROS2 installation path)colcon build --symlink-install --packages-select trajlo
- From the root of the workspace (
ros2_wsdirectory), runsource install/setup.shto source the overlay. Run the Traj-LO algorithm withros2 run trajlo trajlo ./src/Traj-LO/data/config_ouster.yaml. Do not forget to adjust the topic name to your ROS2 bag's topic name. Note that the algorithm runs only with config_ouster.yaml for now. - After running the algorithm, open up another terminal, source your ROS2 installation, then run
ros2 bag play your_rosbag_folderto start playing your ros2 bag. - The algorithm publishes the estimated trajectory information on topic
/trajlo_posewith message typegeometry_msgs/msg/PoseStamped. In order to record the estimated trajectory, open up another terminal, source your ROS2 installation and runros2 bag record -o output_bag /trajlo_pose. After theros2 bag playcommand publishes all of its messages, you may simplyCtrl^Cdo stop recording. - Finally, you may use the evo package to evaluate the trajectories after being saved in a ROS2 bag.
Traj-LO aims to explore the limits of state estimation using only LiDAR sensors.
Nowadays, LO approaches heavily rely on IMU data for accurate state estimation but neglect the true capabilities of LiDAR sensors. Through the continuous-time perspective, Traj-LO matches the performance of state-of-the-art LIO methods in diverse scenarios.
The spatial-temporal movement of LiDAR is parameterized by a simple yet effective continuous-time trajectory, which consists of multiple piecewise linear functions. By coupling the geometric information from streaming LiDAR points and kinematic constraints from trajectory smoothness, it can work even in scenarios where the motion state exceeds the IMU's measuring range. Besides, the framework is generalized for different kinds of LiDAR as well as multi-LiDAR systems.
Follow installation and running sections above to run Traj-LO with your ROS2 bags. Currently, the released code only supports one LiDAR configuration. The corresponding configuration files are located in the "data" directory. For optimal performance, you will need to fine-tune the parameters.
Since Traj-LO is a LiDAR-only method, it may fail in narrow spaces where there are few valid points for a long time.
In addition to the ROSbag data loader, Traj-LO also provides a simple custom GUI for visualization and uses Eigen-based Gauss-Newton for pose optimization. Here are the major libraries we will use.
Although major dependencies are included in the third-party folder, you may still need to run the script install_deps.sh to install libraries like Boost, etc.
- Traj-LO is a continuous-time method, so each point in your rosbag should have a corresponding timestamp.
- When the motion profile is aggressive, you can decrease
seg_intervalor increasekinematic_constraint.
Ubuntu 22.04
You can use WSL2 to install the Ubuntu subsystem and then follow the above instructions to test Traj-LO.
Make sure you have Homebrew to run the srcipt install_deps.shto install dependencies. We have tested Traj-LO on M2 Mac Mini (macOS 14.4.1).
If you use this project for any academic work, please cite RA-L paper.
@ARTICLE{zheng2024traj,
author={Zheng, Xin and Zhu, Jianke},
journal={IEEE Robotics and Automation Letters},
title={Traj-LO: In Defense of LiDAR-Only
Odometry Using an Effective Continuous-Time
Trajectory},
year={2024},
volume={9},
number={2},
pages={1961-1968},
doi={10.1109/LRA.2024.3352360}
}For those interested in multi-sensor fusion, particularly in multi-LiDAR and multi-IMU systems, I recommend checking out Traj-LIO, which is a resilient state estimator through sparse Gaussian Processes.
Thanks for these pioneering works Basalt (Batch Optimization), CT-ICP (Continuous-time Idea), and KISS-ICP (VoxelMap Management).