This documentation shows you how can you create color maps with LIO-SAM. LIO-SAM is a real-time lidar-inertial odometry package. With our modifications you can create color maps using your multiple number of cameras. You can reach our fork with this link
To create color maps with LIO-SAM, there is need for ROS2 bag file and ROS2 bag file should contain these topics:
sensor_msgs/msg/PointCloud2sensor_msgs/msg/Imunav_msgs/msg/Odometry(optional)sensor_msgs/msg/Image(you should provide multiple image)
1. Clone and build package
git clone https://github.com/leo-drive/LIO-SAM-COLOR.git
cd LIO-SAM
colcon build --symlink-install2. Configure the parameters.
Open lio_sam/config/params.yaml and set following parameters.
pointCloudTopic: "/points" # required: your lidar topic
imuTopic: "/imu/data" # required: your imu topic
gpsTopic: "odometry/gpsz" # optional: your odometry topic
useImuHeadingInitialization: true # set true if you use odometry
useGpsElevation: true # set true if you use odometry
# select your lidar sensor from supported types. If your lidar not sport, select velodyne and change other lidar parameters with using your lidar features.
sensor: velodyne
N_SCAN: 32
Horizon_SCAN: 1800
# set your lidar-imu calibration
extrinsicRot: [1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0 ]
extrinsicRPY: [ 1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0 ]
# Example Parameters
#
# Example Image Topics: "/sensing/camera/camera0/image_raw", "/sensing/camera/camera1/image_raw", "/sensing/camera/camera2/image_raw"
# Example Camera Info Topics: "/sensing/camera/camera0/camera_info", "/sensing/camera/camera1/camera_info", "/sensing/camera/camera2/camera_info"
#
# For the above examples, parameters should be set as follows.
cameraTopics: ["/sensing/camera/camera0/", "/sensing/camera/camera1/", "/sensing/camera/camera2/"]
imageTopicLastName: "image_raw"
cameraInfoTopicLastName: "camera_info"3. Run
⚠️ Be sure to publish the transform between lidar and each camera
Install environment and start launch file.
source install/setup.bash
ros2 launch lio_sam run.launch.py4. Save Map
When mapping process is finished, run following command and save slam map to specified path. Be sure you are in LIO-SAM directory.
source install/setup.bash
ros2 service call /lio_sam/save_map lio_sam/srv/SaveMap "{resolution: 0.2, destination: /Downloads/service_LOAM}"

