No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
Repository Summary
Description | ROS2 / FAST_LIO / PGO / Online Re-Localization / Consistent Map with BA or HBA |
Checkout URI | https://github.com/liangheming/fastlio2_ros2.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2024-06-24 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
README
FASTLIO2 ROS2
主要工作
- 重构FASTLIO2 适配ROS2
- 添加回环节点,基于位置先验+ICP进行回环检测,基于GTSAM进行位姿图优化
- 添加重定位节点,基于由粗到细两阶段ICP进行重定位
- 增加一致性地图优化,基于BLAM (小场景地图) 和HBA (大场景地图)
环境依赖
- Ubuntu 22.04
- ROS2 Humble
编译依赖
pcl
Eigen
sophus
gtsam
livox_ros_driver2
详细说明
1.编译 LIVOX-SDK2
git clone https://github.com/Livox-SDK/Livox-SDK2.git
cd ./Livox-SDK2/
mkdir build
cd build
cmake .. && make -j
sudo make install
2.编译 livox_ros_driver2
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
3.编译 Sophus
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的分享
部分脚本
1.激光惯性里程计
ros2 launch fastlio2 lio_launch.py
ros2 bag play your_bag_file
2.里程计加回环
启动回环节点
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}"
3.里程计加重定位
启动重定位节点
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}"
4.一致性地图优化
启动一致性地图优化节点
ros2 launch hba hba_launch.py
调用优化服务
ros2 service call /hba/refine_map interface/srv/RefineMap "{"maps_path": "your maps directory"}"
如果需要调用优化服务,保存地图时需要设置save_patches为true
特别感谢
CONTRIBUTING
No CONTRIBUTING.md found.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.