# fast-lio **Repository Path**: chluck2008/fast-lio ## Basic Information - **Project Name**: fast-lio - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-02 - **Last Updated**: 2025-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Nav Project This project implements FAST-LIO (Fast Direct LiDAR-inertial Odometry), a robust LiDAR-inertial odometry package using a tightly-coupled iterated Kalman filter. The project also includes related works and extended applications. ![rqt_graph](src/doc/rosgraph.png) ## Related Works and Extended Applications - [FAST_LIO](https://github.com/hku-mars/FAST_LIO): FAST-LIO implementation repository - [octomap_mapping](https://github.com/OctoMap/octomap_mapping): Real-time point cloud to 3D occupancy grid mapping with octomap - [move_base](https://github.com/ros-planning/navigation): Package for autonomous robot navigation using global and local planners - [livox_ros_driver](https://github.com/Livox-SDK/livox_ros_driver): ROS driver for Livox LiDAR sensors - [velodyne](https://github.com/ros-drivers/velodyne.git): Package for Velodyne LiDAR sensors ## Related Papers - FAST-LIO2: Fast Direct LiDAR-inertial Odometry - FAST-LIO: A Fast, Robust LiDAR-inertial Odometry Package by Tightly-Coupled Iterated Kalman Filter ## Prerequisites ### Ubuntu and ROS - Ubuntu >= 16.04 (recommended 20.04 for easier project porting) - ROS >= Melodic (recommended Noetic for compatibility with Ubuntu 20.04) ### PCL and Eigen - PCL >= 1.8 ([installation instructions](https://pointclouds.org/downloads/)) - Eigen >= 3.3.4 ([installation instructions](https://eigen.tuxfamily.org/dox/)) ### livox_ros_driver Please follow the [livox_ros_driver installation guide](https://github.com/Livox-SDK/livox_ros_driver) to install the Livox LiDAR driver. ### Other Dependencies Please refer to the `CMakeLists.txt` file for the additional dependencies and install them accordingly. # Project Framework 本项目是一个基于FAST_LIO(Fast LiDAR Odometry)的定位和建图系统。以下是项目的目录结构和说明: ## car_description 用于描述车辆模型的相关文件 - `CMakeLists.txt`:CMake构建脚本文件。 - `config`:存放与麦克纳姆差速模型配置相关的文件。 - `arbotix_car.yaml`:Arbotix控制器的配置文件。 - `include`:包含与车辆描述相关的文件。 - `launch`:包含在Gazebo仿真环境和RViz可视化工具中显示机器人模型的launch文件。 - `car_gazebo.launch`:用于在Gazebo中显示机器人模型。 - `car.launch`:用于在RViz中显示机器人模型。 - `package.xml`:项目的ROS包配置文件。 - `rviz`:包含用于测试机器人模型显示和控制的RViz配置文件。 - `show_description.rviz`:用于测试机器人模型显示的RViz配置文件。 - `src`:包含与车辆描述相关的源代码文件。 - `urdf`:存储机器人模型文件的目录。 - `car_base.urdf.xacro`:基础的车辆模型描述文件。 - `car_camera.urdf.xacro`:车辆模型中相机的描述文件。 ## FAST_LIO FAST_LIO定位和建图系统 - `CMakeLists.txt`:CMake构建脚本文件。 - `config`:包含适配不同激光雷达的配置文件。 - `avia.yaml`:适配Avia雷达的配置文件。 - `horizon.yaml`:适配Horizon雷达的配置文件。 - `mid360.yaml`:适配Mid-360雷达的配置文件。 - `ouster64.yaml`:适配Ouster-64雷达的配置文件。 - `velodyne.yaml`:适配Velodyne雷达的配置文件。 - `doc`:包含港科大论文和验证文件。 - `include`:项目中使用的相关库引用文件。 - `launch`:包含配置不同雷达的launch文件。 - `gdb_debug_example.launch`:GDB调试示例。 - `mapping_avia.launch`:使用Avia雷达进行建图。 - `mapping_horizon.launch`:使用Horizon雷达进行建图。 - `mapping_mid360.launch`:使用Mid-360雷达进行建图。 - `mapping_ouster64.launch`:使用Ouster-64雷达进行建图。 - `mapping_velodyne.launch`:使用Velodyne雷达进行建图。 - `LICENSE`:项目的许可证文件。 - `Log`:存放日志文件的目录。 - `map`:地图文件存放目录。 - `msg`:消息格式声明文件。 - `Pose6D.msg`:自定义的六维位姿消息格式文件。 - `package.xml`:项目的ROS包配置文件。 - `PCD`:生成点云数据的程序存放目录,生成路径在`laserMapping.cpp`的1024行设置。 - `1` - `scans1.pcd` - `scans.pcd` - `README.md`:项目的说明文档。 - `src`:包含预处理和建图定位的源代码文件。 - `IMU_Processing.hpp`:IMU数据处理相关的头文件。 - `laserMapping.cpp`:点云建图和定位的主程序文件。 - `preprocess.cpp`:预处理程序文件,用于点云地图的预处理。 - `preprocess.h`:预处理程序的头文件。 ## IMU IMU数据接收模块 - `CMakeLists.txt`:CMake构建脚本文件。 - `launch`:包含在RViz中显示IMU数据的launch文件,以及其他显示消息接收情况的launch文件。 - `imu_msg.launch`:显示IMU消息接收情况的launch文件。 - `imu_rviz.launch`:在RViz中显示IMU数据的launch文件。 - `imu_spec_msg.launch`:显示IMU特定消息接收情况的launch文件。 - `msg`:消息格式声明文件。 - `package.xml`:项目的ROS包配置文件。 - `rviz`:用于RViz中显示IMU数据的配置文件。 - `imu.rviz`:IMU数据在RViz中的配置文件。 - `src`:IMU数据接收源代码文件。 - `ch_serial.c` - `ch_serial.h` - `serial_imu.cpp` - `sub_spec.cpp` ## nav 导航模块 - `CMakeLists.txt`:CMake构建脚本文件。 - `include`:包含与决策相关的文件。 - `launch`:启动导航的launch文件。 - `map_server.launch` - `nav.launch` - `test.launch` - `map`:存放地图文件的目录,包括2504栅格地图。 - `map.pgm` - `map.yaml` - `package.xml`:项目的ROS包配置文件。 - `rviz_cfg`:用于导航的RViz配置文件。 - `fast_lio.rviz` - `nav.rviz` - `src`:包含与导航相关的源代码文件。 - `arbotix.cpp`:库,用于处理`/cmd_vel`消息,并发布`/odom`(`nav_msgs/Odometry`)用于全局机器人位姿变换,以及发布`/joint_states`(`sensor_msgs/JointState`)用于机器人模型位姿变换。本项目中接入FAST_LIO进行定位(IMU + 雷达点云里程计)。 - `control.cpp`:控制节点代码文件。 - `cmd_vel_serial_py.py`:订阅`/cmd_vel`消息并发布给开发板执行的Python脚本。由于NX2与下位机通信时,C++串口库无法使用,所以使用Python库来实现。 - `Serial.cpp`:下面四个是C++串口通信文件,在Manifold上使用。 - `Serial.h` - `cmd_vel_serial.cpp` - `cmd_vel_subscriber.cpp` - `tf_publisher.cpp`:下位机返回的实时转速计算位姿变换,并发布tf消息给AMCL融合定位,也可以用于反馈给move_base以实时反应实际运动,从而进行更准确的路径规划。 # Build and Run 1. Clone the repository and build the project: ``` cd ~/catkin_ws/ git clone https://future-vision.coding.net/p/ros_nav/d/FAST_LIO/git catkin_make source ./devel/setup.bash ``` 2. Run the project: ``` cd ~/ source ./devel/setup.bash roslaunch nav nav.launch ``` If you want to test using a ROS bag, you can use the `rosbag play` command to play a recorded bag file. ``` rosbag play LidarImu_2023-10-30-08-16-07.bag ``` Note that for actual development, make sure to have both IMU and LiDAR data available for navigation to work correctly. ![运行成功](src/doc/start.png)