yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
ROSMASTER A1 PRO📖
00.Configuration and Operation Guide
  • 0. Unboxing and Review
  • 1.Assembly Videos
  • 2.User Manual
  • 3.Enter Docker (For Raspberry Pi)
  • 4.A1Pro Front Wheel Servo Calibration
  • 5.USB Camera Calibration
  • 6.Depth Camera Calibration
  • 7.FAQ
  • 8.Desktop Configuration Center and Remote Control Guide
01.Chassis Control Course
  • 1.Robot Information Publishing
  • 2.Robot Handle Control
  • 3.Robot Keyboard Control
  • 4.Linear Velocity Calibration
  • 5.Angular Velocity Calibration
  • 6.Robot URDF Model
  • 7.Robot EKF State Estimation
02.Lidar Course
  • 1.Lidar Introduction and Use
  • 2.Lidar Obstacle Avoidance
  • 3.Lidar Following
  • 4.Lidar Patrol
  • 5.GMapping-SLAM Mapping
  • 6.Cartographer-SLAM Mapping
  • 7.Slam-Toolbox Mapping
  • 8.Lifelong Mode Mapping
  • 9.Navigation2 Single Point Navigation
  • 10.Navigation2 Multi Point Navigation
  • 11.Cartographer Relocalization Navigation
  • 12.Slam-Toolbox Localization Navigation
  • 13.Synchronous Mapping And Navigation
  • 14.Aruco Visual Relocalization Navigation
  • 15.Mobile App Mapping And Navigation
  • 16.AprilTag Transport
  • 17.Color Block Transport
03.USB Camera-Depth Camera Course
  • 1.USB Camera Introduction
  • 2.USB Camera Intrinsic Calibration
  • 3.Nuwa-HP60C Camera Introduction (Depth Camera Only)
  • 4.Depth Camera Distance Measurement (Depth Camera Only)
  • 5.Depth Pseudo Color Image (Depth Camera Only)
  • 6.Block Volume Calculation (Depth Camera Only)
  • 7.Edge Detection (Depth Camera Only)
  • 8.RTAB-Map SLAM Mapping (Depth Camera Only)
  • 9.RTAB-Map Navigation (Depth Camera Only)
04.Robotic Arm and 3D Space Gripping Course
  • 0.Robotic Arm Basic Usage
  • 1.Robotic Arm Kinematics
  • 2.Robotic Arm Chassis Coordination Control
  • 3.AprilTag ID Sorting
  • 4.AprilTag Height Anomaly Sorting
  • 5.AprilTag Tracking and Grasping
  • 6.Color Block Sorting
  • 7.Color Block Height Anomaly Sorting
  • 8.Color Block Tracking and Grasping
  • 9.Wood Block Shape Sorting
  • 10.KCF Tracking and Grasping Objects
  • 11.Mediapipe Gesture ID Sorting AprilTag
  • 12.Mediapipe Gesture Height Sorting AprilTag
  • 13.Desktop Tracking and Grasping AprilTag
  • 14.3D Spatial Tracking AprilTag
  • 15.Line Following Obstacle Clearing
  • 16.Transformer Model Tracking Algorithm
05.Road Network Planning and Navigation
  • 1.Introduction To Road Network Planning
  • 2.Road Network Annotation
  • 3.Planning And Navigation Between Waypoints
  • 4.Road Network Navigation In Any Pose
  • 5.Path Re-planning
06.OpenClaw Basic Course
  • 1.Introduction to OpenClaw
  • 2.OpenClaw Core Concepts
  • 3.OpenClaw API-KEY Configuration
  • 4.OpenClaw Switch Models
  • 5.OpenClaw System Prompt Words
  • 6.OpenClaw Common CLI Commands
07.OpenClaw Interaction Method
  • 1.OpenClaw Webchat Interaction
  • 2.OpenClaw Tui Interaction
  • 3.OpenClaw Voice Dialogue Interaction
  • 4.OpenClaw WhatsApp Interaction
08.OpenClaw Development
  • 1.OpenClaw Connecting to Robot MCP Service
  • 2.Robot CLI Command Tool
  • 3.robot-control plugin tool
  • 4.reply-bridge plugin tool
  • 5.OpenClaw Multimodal Vision
  • 6.OpenClaw Chassis Control
  • 7.OpenClaw Robotic Arm Control
  • 8.OpenClaw Skills Development
  • 9.OpenClaw Scheduled Tasks
  • 10.OpenClaw Multi-Agent Intelligent Agent
  • 11.OpenClaw Active Interaction
  • 12.OpenClaw Vector Memory
09.OpenClaw Embodied Intelligent Application
  • 1.OpenClaw Target Tracking
  • 2.OpenClaw Arm Tracking And Grasping
  • 3.OpenClaw Arm Fixed-point Placement
  • 4.OpenClaw Waste Sorting
  • 5.OpenClaw SLAM Mapping And Navigation
  • 6.OpenClaw Navigation Transport
  • 7.OpenClaw AprilTag Grasping
  • 8.OpenClaw Color Line Patrol
  • 9.OpenClaw Visual Distance Measurement
10.OpenClaw Scenario Sandbox
  • 1.Map Description and Prop Placement
  • 2.Build Sand Table Map
  • 3.Visual Relocation Markers
  • 4.Map Mapping Markers
  • 5.OpenClaw Scenario Sandbox Comprehensive Case
11.AI Model Basics
  • 1.AI Large Model Types and Principles
  • 2.RAG Retrieval Enhancement and Model Training Samples
  • 3.Embodied Intelligent Robot System Architecture
  • 4.Embodied Intelligent Functions Core Source Code
12.AI Model Development
  • 1.Register a Model Service Provider Aaccount
  • 2.Configuring API-KEY
  • 3.Introduction to Dify
  • 4.Basic Dify Features
  • 5.AI Large Model Development - chatbot
  • 6.Deploy the RAG Knowledge Base
  • 7.RAG Knowledge Base + chatbot
  • 8.AI Agent Workflow
  • 9.Custom Wake-up Response
13.AI Model - Text Version
  • 1.Semantic Understand and Command Follow
  • 2.Multimodal Visual Understand
  • 3.Multimodal Visual Understand + Robotic Arm Gripping
  • 4.Multimodal Visual Understand+SLAM Navigation
  • 5.Robotic Arm Gripping+Multimodal Visual Understand+SLAM Navigation
  • 6.Intention Estimation
14.AI Model - Voice Version
  • 1.Semantic Understand and Command Follow
  • 2.Multimodal Visual Understand
  • 3. Multimodal Large Model+Robotic Arm Gripping
  • 4.Multimodal Visual Understand+SLAM Navigation
  • 5.Robotic Arm Gripping+Multimodal Visual Understand+SLAM Navigation
  • 6.Intention Estimation
15.Mediapipe Visual Course
  • 1.Hand Detection
  • 2.Posture Detection
  • 3.Overall Detection
  • 4.Facial Landmark Detection
  • 5.Face Detection
  • 6.Face Special Effects
  • 7.3D Object Recognition
  • 8.Brush
  • 9.Finger Control
  • 10.Palm Target Positioning
  • 11.Fingertip Trajectory Recognition
  • 12.Fingertip Gesture Control Cobotic Arm
  • 13.Gesture Grabbing and Releasing Objects
  • 14.Finger Control Robotic Arm
  • 15.Medipipe Gesture Control Robotic arm Cction Group
16.MoveIt2 Simulation Course
  • 1.MovelT2 Configuration
  • 2.MovelT2 Simulation-Reality Linkage
  • 3.Random Movement
  • 4.Forward Kinematics Design
  • 5.Inverse Kinematics Design
  • 6.Cartesian Path
  • 7.Scene Design
  • 8.Trajectory Planning
  • 9.Collision Detection
  • 10.3D Perception Obstacle‑Avoidance
17.Multi-vehicle Course
  • 1.Multi-vehicle Control
  • 2.Multi-vehicle Navigation
  • 3.Multi-vehicle Formation
18.YOLO26 Development
  • 1.CLI Use
  • 2.Object Detection
  • 3.Instance Segmentation
  • 4.Pose Estimation
  • 5.Image Classification
  • 6.Oriented Object Detection
  • 7.YOLOv26 + DeepSORT Tracking
  • 8.Monocular Depth Estimation
19.Control Board STM32 Driver Course
  • 0.Notes (Must Read)
  • 1.About Expansion Board
  • 2.STM32 Development Environment
  • 3.Button Control
  • 4.FreeRTOS Application
  • 5.Serial Communication
  • 6.SBUS Model Aircraft Remote Control
  • 7.CAN Bus Communication
  • 8.RGB Colorful Light Bar
  • 9.Timer Interrupt to Control PWM Servo
  • 10.Control Serial Port Servos
  • 11.Nine-axis Attitude Sensor to Obtain Data
  • 12.Control Motor
  • 13.Timer Captures the Encoder Data
  • 14.1 Kinematic Analysis of Mecanum Wheel
  • 14.2 Kinematic Analysis of Ackerman
  • 14.3 Kinematic Analysis of 4WD
  • 15.PID Control Robot Movement
20.Docker Course
  • 1.Docker Introduction and Installation
  • 2.Docker Basic Commands
  • 3.Docker Submission and Multi-Terminal Access
  • 4. Docker Startup Script
  • 5.Docker-Vscode Environment Construction
21.Image Processing Basics Course
  • 1. Introduction to Open Source CV
  • 2. Image reading and display
  • 3. Image writing
  • 4. Image quality
  • 5. Pixel Operation
  • 6. Image zoom
  • 7. Image cutting
  • 8. Image translation
  • 9. Image Mirroring
  • 10. Affine Transformation
  • 11. Image Rotation
  • 12. Perspective Transformation
  • 13. Grayscale processing
  • 14. Image Binarization
  • 15. Edge Detection
  • 16. Line drawing
  • 17. Rectangle and circle drawing
  • 18. Drawing text and pictures
22.Linux System Course
  • 1.Introduction to Linux system
  • 2.Ubuntu file system
  • 3.Ubuntu common commands
  • 4.Ubuntu common editors
  • 5.Ubuntu software operation commands
  • 6.Virtual machine installation
  • 7.SSH remote control
  • 8.VNC remote control
  • 9.Transfer files remotely
  • 10.Driver library and communication
  • 11.Static IP and hotspot mode
  • 12.Bind device ID
  • 13.Capacity expansion and resource allocation
  • 14.Update system software sources
  • 15.Set root user password
  • 16.sudo free password
  • 17.Connect to WiFi network
  • 18.View system version
  • 19.Customized service management
  • 20.Back up system image
23.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
24.Main Control Course
Jetson Orin Nano_NX
  • 1.Jetson Orin board introduction
  • 2.Restore the factory image system
  • 3.Backup SSD system
  • 4.SSD expansion
  • 5.Network configuration
  • 6.SSH remote login
  • 7.VNC remote control
  • 8.Remote file transfer
  • 9.Jtop tool
  • 10.Exchange space expansion
Raspberry Pi
  • 1. Introduction to Raspberry PI 5
  • 2. Raspberry PI system installation and backup
  • 3. Powering the Raspberry PI 5
  • 4. Startup of Raspberry PI 5
  • 5. Update and upgrade operating system
  • 6. Introduction to raspi-config tool
  • 7. config.txt file description
  • 8. Network Configuration
  • 9. remote access
  • 10. Transfer files remotely
  • 11. Set display resolution and rotation
  • 12. Set screen to sleep
  • 13. Play audio and video
  • 14. Using USB camera
  • 15. Using MIPI camera
  • 16. Get real-time temperature of Raspberry Pi
RDKX5
  • 1.Introduction to RDK X5 board
  • 2.Write system file
  • 3.Hardware interface description
  • 4.Install case and other accessories
  • 5.Network configuration
  • 6.Remote login
  • 7.Update system
  • 8.srpi-config user guide
  • 9.config. txt configuration file
  • 10.Self-startup setting
  • 11.RDK exclusive command usage
  • 12.Linux command usage
  • 13.GPIO readwrite operation
  • 14.Image classification algorithm
  • 15.Use USB camera
  • 16.Use MIPI camera
  • 17.Binocular camera depth algorithm
  • 18. Controlling RGB Cooling Fans
Download
  • SystemFile
  • Code
  • 3D_Model_File
  • Software_Tools
  • Hardware_Info
  • Introduction_Manual
  • Script_File
  • Dify AI Agent
Download ZIP

Welcome to ROSMASTER A1 PRO repository

7.Slam-Toolbox Mapping

🗺️ Slam-Toolbox Mapping

1. Course Content

  • Master using SLAM-Toolbox (online synchronous mode) for 2D laser SLAM mapping.

  • Master remote controlling the A1 Pro robot for mapping and viewing laser scan matching and pose graph optimization process in RViz2.

  • Master methods for saving standard OccupancyGrid raster maps (.yaml + .pgm) and SLAM-Toolbox pose graph files (.posegraph + .data).


2. SLAM-Toolbox Introduction

SLAM-Toolbox is an open-source 2D SLAM (Simultaneous Localization and Mapping) algorithm package officially recommended and deeply integrated by ROS 2, led by ROS navigation and localization working group expert Steve Macenski. It is based on Graph-based SLAM theoretical framework, designed for mapping and localization in long-cycle, large-scale dynamic environments.

  • Front-End Scan Matching: Through continuous scan buffer and correlative scan matching (CSM / Karto Scan Matcher), multiple frames of LaserScan lidar point cloud are quickly registered with odometry prior to generate continuous pose nodes.

  • Back-End Graph Optimization: Background constructs pose graph based on Google Ceres nonlinear optimization solver, and when loop closure is triggered, combines HuberLoss robust kernel function to perform global pose graph relaxation and optimization, eliminating accumulated drift.

  • Features and Advantages:

    • Lifelong/Continuing Mapping: Supports loading existing pose graph files and continuing to expand and correct on historical maps.

    • Map Serialization and Deserialization: Natively supports saving complete graph structure (pose nodes and original scan point cloud) as .posegraph and .data files.

    • Low CPU Usage and High Real-time Performance: Compared to traditional algorithms, multi-threaded architecture and sparse graph optimization mechanism greatly reduce computational overhead, very suitable for embedded edge computing platforms.

image-20260831145050114


3. Preparation and Running

This example requires opening 3~4 terminals to start the following nodes in sequence:

3.1 Start SLAM-Toolbox Mapping Node

Run in Terminal 1 (automatically starts chassis driver, lidar driver, and SLAM-Toolbox core algorithm):

xxxxxxxxxx
ros2 launch yahboomcar_nav map_slam_toolbox_launch.py

3.2 Start RViz Map Visualization

Run in Terminal 2 (it is recommended to open RViz on the virtual machine if the VM and robot are on the same LAN):

xxxxxxxxxx
ros2 launch yahboomcar_nav display_map_launch.py

3.3 Start Keyboard Control to Move Robot for Mapping

Run in Terminal 3 the keyboard control node:

xxxxxxxxxx
ros2 run yahboomcar_ctrl yahboom_keyboard

image-20260831145200462


3.4 Mapping Operation and Map Save Instructions

  1. Mapping Driving Suggestions:

    • Remote control the robot to slowly and smoothly drive through the entire environment to be tested, observe the continuous matching of laser point cloud and real-time expansion of occupancy grid map in RViz.

    • Appropriately reduce speed at turns to allow the lidar sufficient frame rate to update the local buffer.

    • After driving one loop and returning near the starting point to form a loop closure, the system automatically triggers global loop closure detection and optimizes the entire pose graph, eliminating corridor accumulated error.

  2. Save 2D Raster Map (.yaml + .pgm): After mapping is complete, run the raster map save command in Terminal 4:

    xxxxxxxxxx
    ros2 launch yahboomcar_nav save_map_launch.py map_name:=map

    Map files will be saved in ~/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/maps/ directory, including:

    • map.yaml: Map metadata configuration file (including resolution, origin pose, occupancy threshold, etc.).

    • map.pgm: Grayscale raster image file (white for free traversable areas, black for obstacles, gray for unknown areas).

  3. Save SLAM-Toolbox Pose Graph File (.posegraph + .data): The pose graph file contains complete topological graph nodes, loop closure constraints, and original laser scan data, which is the core data required for subsequent SLAM-Toolbox continuing mapping or pure localization navigation:

    xxxxxxxxxx
    ros2 launch yahboomcar_nav save_map_launch.py map_type:=posegraph map_name:=map

    After successful saving, generated files:

    • map.posegraph: Pose graph topological structure and optimized node metadata.

    • map.data: Binary file of original laser point cloud scan measurement data for each node.

Note

After saving is complete, press Ctrl+C in each terminal to stop the program.


4. Core Source Code and Algorithm Parameter Analysis

4.1 Mapping Launch File Analysis

Launch File Path:

xxxxxxxxxx
$HOME/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/launch/slam/map_slam_toolbox_launch.py

Launch Core Source

xxxxxxxxxx
def generate_launch_description():
    package_dir = get_package_share_directory("yahboomcar_nav")

    # 1. Declare Launch arguments
    declared_arguments = []
    declared_arguments.append(
        DeclareLaunchArgument(
            "pose_graph",
            default_value="",
            description="Pose graph basename or absolute path, without .posegraph/.data extension. Empty starts a new map."
        )
    )
    declared_arguments.append(
        DeclareLaunchArgument(
            "slam_mode",
            default_value="sync",
            choices=["sync", "async"],
            description="SLAM mode selection. Sync is recommended for repeatable mapping."
        )
    )
    declared_arguments.append(
        DeclareLaunchArgument(
            "initial_pose_mode",
            default_value="rviz",
            choices=["rviz", "dock"],
            description="How to initialize an existing pose graph: select pose in RViz or start at dock."
        )
    )
    declared_arguments.append(
        DeclareLaunchArgument(
            "odom_source",
            default_value="wheel",
            choices=["wheel", "fused"],
            description="Odometry input: 'wheel' uses independent Ackermann wheel odometry; 'fused' uses RF2O/IMU EKF pipeline."
        )
    )

    pose_graph = LaunchConfiguration("pose_graph")
    slam_mode = LaunchConfiguration("slam_mode")
    initial_pose_mode = LaunchConfiguration("initial_pose_mode")

    # 2. Chassis and lidar driver start (select independent wheel odometry or EKF fused odometry based on odom_source)
    wheel_bringup_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(package_dir, "launch", "robot", "laser_bringup_launch.py")
        ),
        condition=LaunchConfigurationEquals("odom_source", "wheel"),
    )

    fused_bringup_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(package_dir, "launch", "robot", "laser_bringup_rf2o_launch.py")
        ),
        condition=LaunchConfigurationEquals("odom_source", "fused"),
    )

    # 3. Introduce SLAM-Toolbox algorithm node and relocalization scheduling
    slam_toolbox_launch = IncludeLaunchDescription(
        PythonLaunchDescriptionSource(
            os.path.join(package_dir, "launch", "slam", "slam_toolbox_wit_launch.py")
        ),
        launch_arguments={
            "pose_graph": pose_graph,
            "slam_mode": slam_mode,
            "initial_pose_mode": initial_pose_mode,
        }.items(),
    )

    return LaunchDescription([
        *declared_arguments,
        wheel_bringup_launch,
        fused_bringup_launch,
        slam_toolbox_launch,
    ])

Launch Design Highlights

  • odom_source Odometry Source Selection: Defaults to wheel (independent Ackermann wheel odometry). Since the lidar field of view is 235° forward, using independent wheel odometry avoids using the same limited FOV lidar data for both RF2O laser odometry and SLAM-Toolbox, preventing error positive feedback coupling.

  • slam_mode Sync/Async Mode: Defaults to sync (online synchronous mode), ensuring every lidar frame is strictly processed and pose graph node updated, with higher mapping consistency and boundary sharpness.

  • Continuing Mapping and Relocalization Support: Through pose_graph and initial_pose_mode parameters, supports loading historical .posegraph files, and after giving initial pose in RViz via slam_pose_initializer node, smoothly expands historical map.


4.2 SLAM-Toolbox Node Scheduling Analysis

File Path:

xxxxxxxxxx
$HOME/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/launch/slam/slam_toolbox_wit_launch.py

slam_toolbox_wit_launch.py as the SLAM core scheduling layer has the following core logic:

  1. Pose Graph File Integrity Check: Automatically verifies whether the specified historical map .posegraph and .data files are complete.

  2. Dynamic Node Loading: Dynamically executes sync_slam_toolbox_node or async_slam_toolbox_node based on slam_mode.

  3. Initial Pose Relocalization Access: When loading historical map and initial_pose_mode == 'rviz', automatically starts slam_pose_initializer node, intercepts lidar point cloud and after RViz gives /initialpose initial pose, calls /slam_toolbox/deserialize_map service to complete relocalization.


4.3 Map Save Mechanism Analysis

File Path:

xxxxxxxxxx
$HOME/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/launch/slam/save_map_launch.py
xxxxxxxxxx
# 1. Save pose graph (map_type == 'posegraph')
save_posegraph = GroupAction(
    condition=IfCondition(PythonExpression(["'", map_type, "' == 'posegraph'"])),
    actions=[
        ExecuteProcess(
            cmd=[
                'ros2', 'service', 'call', '/slam_toolbox/serialize_map', 
                'slam_toolbox/srv/SerializePoseGraph',
                ['{filename: "', PathJoinSubstitution([map_save_dir, map_name]), '"}']
            ],
            output='screen'
        )
    ]
)

# 2. Save 2D raster map (map_type == 'gridmap')
save_map = Node(
    package='nav2_map_server',
    executable='map_saver_cli',
    parameters=[{
        'map_subscribe_transient_local': False,
        'save_map_timeout': 10.0,
    }],
    arguments=[
        '-f', PathJoinSubstitution([map_save_dir, map_name]),
        '--free', '0.196',
        '--occ', '0.65'
    ],
    condition=IfCondition(PythonExpression(["'", map_type, "' == 'gridmap'"]))
)
  • Raster Map Save: Calls nav2_map_server's map_saver_cli node, subscribes to /map topic and marks grids with occupancy probability greater than 0.65 as obstacles, less than 0.196 as free, outputting .yaml and .pgm.

  • Pose Graph Save: Calls /slam_toolbox/serialize_map service, SLAM-Toolbox internally serializes the pose graph and original laser frames in memory to disk files.


4.4 SLAM-Toolbox Algorithm Configuration and Core Parameter Interpretation

Configuration File Path:

xxxxxxxxxx
$HOME/yahboomcar_ros2_ws/yahboomcar_ws/src/yahboomcar_nav/params/mapper_params_online_sync.yaml

Core Parameter Description Table

Parameter NameCurrent Config ValueCore Function and Physical Meaning
solver_pluginCeresSolverGraph optimization back-end nonlinear least squares solver plugin (based on Google Ceres)
ceres_loss_functionHuberLossRobust kernel function for optimization objective, preventing map distortion from edge incorrect loop closure constraints
modemappingWorking mode: mapping / localization
resolution0.05Occupancy grid map resolution (0.05 meters/pixel)
min_laser_range / max_laser_range0.1 / 10.0Shortest and longest effective laser ranging distance for rasterization mapping (meters)
minimum_travel_distance0.1Robot straight-line displacement threshold (meters), insert new pose graph node when moved beyond this value
minimum_travel_heading0.01745Robot rotation displacement threshold (approximately 1°), insert node even for tiny rotations to ensure dense turn point cloud
scan_buffer_size30Local sliding window scan buffer size, similar to Cartographer's Submap submap mechanism
scan_buffer_maximum_scan_distance5.0Maximum spatial allowed distance between laser frames in scan buffer (meters)
do_loop_closingtrueWhether to enable global loop closure detection and loop graph optimization
loop_search_maximum_distance4.0Maximum candidate spatial search radius for triggering loop matching (meters)
loop_match_minimum_chain_size12Minimum continuous matching frame chain length required for loop matching, strictly filtering occasional false positive matches
loop_match_minimum_response_fine0.55Loop fine matching score threshold (0~1.0), only establishes loop edge when score exceeds this threshold
distance_variance_penalty0.25Penalty factor for displacement variance when geometric features degrade (such as featureless long corridors), tending to trust wheel odometry
angle_variance_penalty0.25Penalty factor for angular variance when geometric features degrade

YAML Configuration File Complete Source

slam_toolbox:
  ros__parameters:

    # 1. Ceres graph optimization back-end solver configuration
    solver_plugin: solver_plugins::CeresSolver
    ceres_linear_solver: SPARSE_NORMAL_CHOLESKY
    ceres_preconditioner: SCHUR_JACOBI
    ceres_trust_strategy: LEVENBERG_MARQUARDT
    ceres_dogleg_type: TRADITIONAL_DOGLEG
    ceres_loss_function: HuberLoss

    # 2. ROS coordinate frame and base topic parameters
    odom_frame: odom
    map_frame: map
    base_frame: base_footprint
    scan_topic: /scan
    use_map_saver: true
    mode: mapping

    debug_logging: false
    throttle_scans: 1
    transform_publish_period: 0.03
    map_update_interval: 5.0
    resolution: 0.05
    min_laser_range: 0.1
    max_laser_range: 10.0
    minimum_time_interval: 0.5
    transform_timeout: 0.2
    tf_buffer_duration: 30.
    stack_size_to_use: 40000000
    enable_interactive_mode: true

    # 3. Front-end scan matching and pose graph node insertion strategy
    use_scan_matching: true
    use_scan_barycenter: true
    minimum_travel_distance: 0.1
    minimum_travel_heading: 0.01745 # 1 degree
    scan_buffer_size: 30
    scan_buffer_maximum_scan_distance: 5.0
    link_match_minimum_response_fine: 0.2
    link_scan_maximum_distance: 1.5
    loop_search_maximum_distance: 4.0
    do_loop_closing: true 

    # 4. Loop closure detection (Loop Closure) and constraint construction thresholds
    loop_match_minimum_chain_size: 12
    loop_match_maximum_variance_coarse: 1.5
    loop_match_minimum_response_coarse: 0.45
    loop_match_minimum_response_fine: 0.55

    # 5. Correlation matching search space parameters
    correlation_search_space_dimension: 0.5
    correlation_search_space_resolution: 0.01
    correlation_search_space_smear_deviation: 0.1 

    # 6. Loop search space parameters
    loop_search_space_dimension: 6.0
    loop_search_space_resolution: 0.05
    loop_search_space_smear_deviation: 0.03

    # 7. Scan matcher and odometry prior penalty factors
    distance_variance_penalty: 0.25
    angle_variance_penalty: 0.25
    fine_search_angle_offset: 0.00349     
    coarse_search_angle_offset: 0.2618 # 15 degrees
    coarse_angle_resolution: 0.01745 # 1 degree
    minimum_angle_penalty: 0.5
    minimum_distance_penalty: 0.5
    use_response_expansion: false
    min_pass_through: 3
    occupancy_threshold: 0.2
Cartographer-SLAM Mapping
Lifelong Mode 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/中文