yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
WLR722 LiDAR📖
1. Lidar Usage
  • 1. PC Software View Lidar
  • 2. Ros Driver Lidar
2. Cartographer Algorithm
  • 1. Cartographer 2D Mapping
  • 2. Cartographer 3D Mapping
3. Lego Loam Algorithm
  • 1. Compile Lego Loam Algorithm
  • 2. Lego Loam Algorithm Mapping
4. Lio Sam Algorithm
  • 1. Compile Lio Sam Algorithm
  • 2. Lio Sam Algorithm Mapping
5. Autoware Algorithm
  • 1. Compile Autoware Algorithm
  • 2. Autoware Navigation Lidar Adaptation
6. ROS2 Basic Course
  • 1.Introduction to ROS2
  • 2.ROS2 install Humble
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
Download
  • 3D_Model_File
  • Source Code
  • PC Software
  • Data Manual
Download ZIP

Welcome to WLR722 LiDAR repository

2. Lio Sam Algorithm Mapping

Lio Sam Algorithm Mapping

This algorithm has been successfully compiled and run on the Orin-Nano motherboard. Orin-Nano motherboard system environment: Ubuntu22.04+ROS2-Humble.

Startup Command

Open Terminal 1 and enter the following command to start the Lio-Sam mapping program,

ros2 launch lio_sam run.launch.py

After the program starts, an rviz will open to display the mapping process,

Open Terminal 2 and enter the following command to start the 32-line lidar,

xxxxxxxxxx
ros2 launch vanjee_lidar_sdk start.py

Then, slowly move the lidar. The point cloud map in rviz will be gradually generated, as shown in the following figure,

image-20260424202243816

Saving the Map

Open Terminal 3 and enter the following command to save the map,

xxxxxxxxxx
ros2 service call /lio_sam/save_map lio_sam/srv/SaveMap "{resolution: 0.5 , destination: /Downloads/LioSam}"

Here, resolution represents the sampling rate, and destination represents the folder to save. Given /Downloads/LioSam here, it means the saved point cloud map will be placed in the ~/Dowloads/LioSam directory. The code adds a ~.

Then, we can see in the ~/Dowloads/LioSam directory that 5 .pcd files have been generated. Among them, GlobalMap.pcd is the global point cloud map. You can use the following command in the graphical interface to view the global point cloud map,

xxxxxxxxxx
cd ~/Dowloads/LioSam # Modify the path here according to the actual save address
pcl_viewer GlobalMap.pcd

The parameter table is as follows,

​x
/**:
  ros__parameters:

    # Topics
    pointCloudTopic: "/rslidar_points"                   # Point cloud data
    imuTopic: "/vanjee_lidar_imu_packets"                        # IMU data
    odomTopic: "odometry/imu"                    # IMU pre-preintegration odometry, same frequency as IMU
    gpsTopic: "odometry/gpsz"                    # GPS odometry topic from navsat, see module_navsat.launch file

    # Frames
    lidarFrame: "vanjee_lidar"
    baselinkFrame: "base_link"
    odometryFrame: "odom"
    mapFrame: "map"

    # GPS Settings
    useImuHeadingInitialization: false           # if using GPS data, set to "true"
    useGpsElevation: false                       # if GPS elevation is bad, set to "false"
    gpsCovThreshold: 2.0                         # m^2, threshold for using GPS data
    poseCovThreshold: 25.0                       # m^2, threshold for using GPS data

    # Export settings
    savePCD: true                               # https://github.com/TixiaoShan/LIO-SAM/issues/3

    # Sensor Settings
    sensor: velodyne                               # lidar sensor type, either 'velodyne', 'ouster' or 'livox'
    N_SCAN: 32                                   # number of lidar channels (i.e., Velodyne/Ouster: 16, 32, 64, 128, Livox Horizon: 6)
    Horizon_SCAN: 2000                            # lidar horizontal resolution (Velodyne:1800, Ouster:512,1024,2048, Livox Horizon: 4000)
    downsampleRate: 1                            # default: 1. Downsample your data if too many
    # points. i.e., 16 = 64 / 4, 16 = 16 / 1
    lidarMinRange: 0.3                           # default: 1.0, minimum lidar range to be used
    lidarMaxRange: 40.0                        # default: 1000.0, maximum lidar range to be used
    maxFeatureNum: 300


    # IMU Settings
    imuAccNoise: 3.9939570888238808e-03
    imuGyrNoise: 1.5636343949698187e-03
    imuAccBiasN: 6.4356659353532566e-05
    imuGyrBiasN: 3.5640318696367613e-05

    imuGravity: 9.80511
    imuRPYWeight: 0.01

    maxVel: 50.0
    maxIter: 4
    maxNoise: 0.01
    accGating: 0.5
    gyrGating: 0.5

    extrinsicTrans:  [ 0.0,  0.0,  0.0 ]
    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]

    # LOAM feature threshold
    edgeThreshold: 0.1
    surfThreshold: 0.1
    edgeFeatureMinValidNum: 5
    surfFeatureMinValidNum: 30

    # voxel filter paprams
    odometrySurfLeafSize: 0.2                     # default: 0.4 - outdoor, 0.2 - indoor
    mappingCornerLeafSize: 0.1                    # default: 0.2 - outdoor, 0.1 - indoor
    mappingSurfLeafSize: 0.2                      # default: 0.4 - outdoor, 0.2 - indoor

    # robot motion constraint (in case you are using a 2D robot)
    z_tollerance: 1000.0                          # meters
    rotation_tollerance: 1000.0                   # radians

    # CPU Params
    numberOfCores: 3                              # number of cores for mapping optimization
    mappingProcessInterval: 0.                  # seconds, regulate mapping frequency

    # Surrounding map
    surroundingkeyframeAddingDistThreshold: 1.0   # meters, regulate keyframe adding threshold
    surroundingkeyframeAddingAngleThreshold: 0.2  # radians, regulate keyframe adding threshold
    surroundingKeyframeDensity: 2.0               # meters, downsample surrounding keyframe poses
    surroundingKeyframeSearchRadius: 50.0         # meters, within n meters scan-to-map optimization
    # (when loop closure disabled)

    # Loop closure
    loopClosureEnableFlag: false
    loopClosureFrequency: 1.0                     # Hz, regulate loop closure constraint add frequency
    surroundingKeyframeSize: 25                   # submap size (when loop closure enabled)
    historyKeyframeSearchRadius: 15.0             # meters, key frame that is within n meters from
    # current pose will be considerd for loop closure
    historyKeyframeSearchTimeDiff: 30.0           # seconds, key frame that is n seconds older will be
    # considered for loop closure
    historyKeyframeSearchNum: 25                  # number of hostory key frames will be fused into a
    # submap for loop closure
    historyKeyframeFitnessScore: 0.3              # icp threshold, the smaller the better alignment

    # Visualization
    globalMapVisualizationSearchRadius: 1000.0    # meters, global map visualization radius
    globalMapVisualizationPoseDensity: 10.0       # meters, global map visualization keyframe density
    globalMapVisualizationLeafSize: 1.0           # meters, global map visualization cloud density

Debug and modify according to actual situations.

Compile Lio Sam Algorithm
Compile Autoware Algorithm

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文