How enginksz/lio_sam_gazebo_ros2 works
This repository combines a Gazebo robot simulation with a ROS 2 LIO-SAM localization and mapping stack. The documented workflow is to launch LIO-SAM and the robot simulation in separate terminals; the simulation launch also starts robot control and state publishing. LIO-SAM’s distinct stages include point-cloud projection, feature extraction, IMU preintegration, and map optimization, with shared parameter and point-cloud utilities. Source excerpts show these stages and simulation launch composition, but do not establish the ROS topic connections between them, so those links are omitted.
Main entry points: robot_sim.launch.py Simulation launch · utility.hpp Shared utilities · imageProjection.cpp Cloud projection · featureExtraction.cpp Feature extraction
Components 17
Robot simulation
- Simulation launch
src/robot_gazebo/launch/robot_sim.launch.py - Outdoor world
src/robot_gazebo/worlds/outdoor.world
LIO-SAM processing
- LIO-SAM launch
src/LIO-SAM-ros2/launch/run.launch.py - Cloud projection
src/LIO-SAM-ros2/src/imageProjection.cpp - Feature extraction
src/LIO-SAM-ros2/src/featureExtraction.cpp - IMU preintegration
src/LIO-SAM-ros2/src/imuPreintegration.cpp - Map optimization
src/LIO-SAM-ros2/src/mapOptmization.cpp - Shared utilities
src/LIO-SAM-ros2/include/lio_sam/utility.hpp - CloudInfo message
src/LIO-SAM-ros2/msg/CloudInfo.msg - SaveMap service
src/LIO-SAM-ros2/srv/SaveMap.srv
Robot model and control
- Control launch
src/robot_control/launch/robot_control.launch.py - Robot control
src/robot_control/scripts/robot_control.py - State publisher launch
src/robot_gazebo/launch/robot_state_publisher.launch.py - Robot description
src/robot_description/robot/robot.urdf.xacro
Simulation sensors
- Velodyne laser plugin
src/velodyne_simulator/velodyne_gazebo_plugins/src/GazeboRosVelodyneLaser.cpp - Velodyne model assets
src/robot_gazebo/models/velodyne_description
Other components
- Operator
Connections 13
- Operator → LIO-SAM launch: launches
README.md - Operator → Simulation launch: launches
README.md - Simulation launch → Outdoor world: loads
src/robot_gazebo/launch/robot_sim.launch.py - Simulation launch → Control launch: includes
src/robot_gazebo/launch/robot_sim.launch.py - Control launch → Robot control: starts
src/robot_control/launch/robot_control.launch.py - Simulation launch → State publisher launch: includes
src/robot_gazebo/launch/robot_sim.launch.py - Feature extraction → Shared utilities: uses
src/LIO-SAM-ros2/src/featureExtraction.cpp - Cloud projection → Shared utilities: uses
src/LIO-SAM-ros2/src/imageProjection.cpp - IMU preintegration → Shared utilities: uses
src/LIO-SAM-ros2/src/imuPreintegration.cpp - Map optimization → Shared utilities: uses
src/LIO-SAM-ros2/src/mapOptmization.cpp - Feature extraction → CloudInfo message: uses message
src/LIO-SAM-ros2/src/featureExtraction.cpp - Cloud projection → CloudInfo message: uses message
src/LIO-SAM-ros2/src/imageProjection.cpp - Map optimization → SaveMap service: uses service
src/LIO-SAM-ros2/src/mapOptmization.cpp