- 重构FASTLIO2 适配ROS2
- 添加回环节点,基于位置先验+ICP进行回环检测,基于GTSAM进行位姿图优化
- 添加重定位节点,基于由粗到细两阶段ICP进行重定位
- 增加一致性地图优化,基于BLAM (小场景地图) 和HBA (大场景地图)
- Ubuntu 22.04
- ROS2 Humble
pcl
Eigen
sophus
gtsam
livox_ros_driver2
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install
mkdir -r ws_livox/src
git clone https://github.com/Livox-SDK/livox_ros_driver2.git ws_livox/src/livox_ros_driver2
cd ws_livox/src/livox_ros_driver2
source /opt/ros/humble/setup.sh
./build.sh humble
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout 1.22.10
mkdir build && cd build
cmake .. -DSOPHUS_USE_BASIC_LOGGING=ON
make
sudo make install
新的Sophus依赖fmt,可以在CMakeLists.txt中添加add_compile_definitions(SOPHUS_USE_BASIC_LOGGING)去除,否则会报错
链接: https://pan.baidu.com/s/1rTTUlVwxi1ZNo7ZmcpEZ7A?pwd=t6yb 提取码: t6yb
--来自百度网盘超级会员v7的分享
ros2 launch fastlio2 lio_launch.py
ros2 bag play your_bag_file
ros2 launch pgo pgo_launch.py
ros2 bag play your_bag_file
ros2 service call /pgo/save_maps interface/srv/SaveMaps "{file_path: 'your_save_dir', save_patches: true}"
ros2 launch localizer localizer_launch.py
ros2 bag play your_bag_file // 可选
ros2 service call /localizer/relocalize interface/srv/Relocalize "{"pcd_path": "your_map.pcd", "x": 0.0, "y": 0.0, "z": 0.0, "yaw": 0.0, "pitch": 0.0, "roll": 0.0}"
ros2 service call /localizer/relocalize_check interface/srv/IsValid "{"code": 0}"
ros2 launch hba hba_launch.py
ros2 service call /hba/refine_map interface/srv/RefineMap "{"maps_path": "your maps directory"}"
如果需要调用优化服务,保存地图时需要设置save_patches为true