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

1. Cartographer 2D Mapping

Cartographer 2D Mapping

Algorithm Installation

Taking ros2-humble as an example, enter the following command in the terminal to install,

xxxxxxxxxx
# Core packages
sudo apt install ros-humble-cartographer ros-humble-cartographer-ros -y
# Supplementary packages
sudo apt install ros-humble-cartographer-rviz -y
sudo apt install ros-humble-nav2-map-server -y

Transplanting Source Code

Place the [cartographer Source Code] from the [Attachments] folder into the src directory of your workspace, then go back to the workspace directory and compile,

xxxxxxxxxx
colcon build

Starting Mapping

Terminal 1: Enter the following command to start the lidar,

xxxxxxxxxx
ros2 launch vanjee_lidar_sdk start.py

Terminal 2: Enter the following command to start rviz display,

xxxxxxxxxx
ros2 launch yahboomcar_nav display_map_launch.py

Terminal 3: Enter the following command to start Cartographer mapping,

xxxxxxxxxx
ros2 launch yahboomcar_nav cartographer_3d_launch.py

The rviz interface will display as follows,

image-20260427162531470

Slowly move the lidar, the point cloud will move accordingly, and the grid map will update as well.

Saving the Map

Terminal 4: Enter the following command to save the map,

xxxxxxxxxx
ros2 launch  yahboomcar_nav save_map_launch.py

The saved map is a 2D grid map used for Nav2 navigation. The saved map is located in the directory,

xxxxxxxxxx
yahboomcar_nav/maps/yahboomcar.pgm

Mapping Parameters

The cartographer mapping parameters are located in the yahboomcar_nav directory,

xxxxxxxxxx
yahboomcar_nav/params/lds_3d.lua

For the parameter table as follows,

include "map_builder.lua"
include "trajectory_builder.lua"

options = {
  map_builder = MAP_BUILDER,
  trajectory_builder = TRAJECTORY_BUILDER,
  map_frame = "map",
  --Lidar coordinate system
  tracking_frame = "vanjee_lidar",
  published_frame = "base_link",
  odom_frame = "odom",
  provide_odom_frame = true,
  publish_frame_projected_to_2d = false,
  use_odometry = false,
  use_nav_sat = false,
  use_landmarks = false,
  num_laser_scans = 0,
  num_multi_echo_laser_scans = 0,
  num_subdivisions_per_laser_scan = 1,
  num_point_clouds = 1,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.3,
  pose_publish_period_sec = 5e-3,
  trajectory_publish_period_sec = 30e-3,
  rangefinder_sampling_ratio = 1.,
  odometry_sampling_ratio = 1.,
  fixed_frame_pose_sampling_ratio = 1.,
  imu_sampling_ratio = 1.,
  landmarks_sampling_ratio = 1.,
}

MAP_BUILDER.use_trajectory_builder_2d = false
--Declare it is using 3D mode
MAP_BUILDER.use_trajectory_builder_3d = true
--Lidar detection distance
TRAJECTORY_BUILDER_3D.min_range = 0.3
TRAJECTORY_BUILDER_3D.max_range = 70.0
TRAJECTORY_BUILDER_3D.num_accumulated_range_data= 1
TRAJECTORY_BUILDER_3D.motion_filter.max_angle_radians = math.rad(1.0)
TRAJECTORY_BUILDER_3D.voxel_filter_size = 0.05
POSE_GRAPH.constraint_builder.min_score = 0.45
POSE_GRAPH.constraint_builder.global_localization_min_score = 0.45

--POSE_GRAPH.optimize_every_n_nodes = 30

return options
Ros Driver Lidar
Cartographer 3D Mapping

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/中文