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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file
CONTRIBUTING
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 | 2025-04-26 |
| Dev Status | UNKNOWN |
| Released | UNRELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
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
调用优化服务
File truncated at 100 lines see the full file