Welcome to ROSMASTER A1 PRO repository
4.Map Mapping Markers
Map Mapping Markers
1. Course Content
Course Overview
After completing Cartographer sandbox mapping and route network annotation, we have a fine sandbox digital map. But in the computer's view, the map itself is just a bunch of laser point arrays and obstacle boundaries - it doesn't understand where is "shipping area", where is "Shelf 1", or where is "food waste garbage bin".
Semantic Map Mapping's core mission is to build a bridge between the human's natural language world and the robot's mathematical space coordinates:
Human Perspective: Natural language instructions just say "Go to shipping area", "Go to Shelf 3";
Robot Perspective: After receiving instructions, quickly look up the corresponding global world coordinates
and quaternion heading
in the
map_mapping.yamlmapping dictionaryHand-Eye Coordination Perspective: The parking position and car heading must be just right, ensuring after the cart stops, the onboard RGB-D camera can completely overlook and capture the bricks or shelf trays on the workbench!
Learning Objectives
Understand the bridging role of semantic location mapping in embodied intelligence long-task planning.
Skilled use of
robot_controlCLI tool for high-precision coordinate marking of various workstations in the sandbox.Master parking position and camera angle placement specifications for typical workstations (shelves, shipping tables, classified garbage bins).
Master the structure of
map_mapping.yamlconfiguration file and manual fine-tuning techniques.
2. Preparation
2.1 Complete Prerequisites
Please ensure you have completed [Build Sand Table Map] (having map.yaml and Cartographer pose graph map.pbstream) and [Visual Relocation Markers] (key workstation tags have been recorded through check-in tool).
2.2 Start MCP Core Service Node
Run the following startup command in the host terminal to pull up chassis drive, robotic arm assistance, TF transform, camera, and MCP scheduling service at once:
xxxxxxxxxxros2 launch dofbot_pro_bringup mcp_service.launch.py relocation:=true display_windows_only_track:=false

2.4 Start Cartographer Pose Graph Global Localization
Execute the following command in a new host terminal to load sandbox pose graph and start global localization:
xxxxxxxxxxros2 launch yahboomcar_nav localization_imu_odom.launch.py use_rviz:=false load_state_filename:=/home/jetson/map/map.pbstream
#pi5ros2 launch yahboomcar_nav localization_imu_odom.launch.py use_rviz:=false load_state_filename:=/root/map/map.pbstream
#rdkros2 launch yahboomcar_nav localization_imu_odom.launch.py use_rviz:=false load_state_filename:=/home/sunrise/map/map.pbstream
2.5 Start Route Network Docker Container and Route Network Navigation Service
Open a new terminal, enter the route network Docker container environment and start route network navigation:
xxxxxxxxxx# Quick start commandbringup_ros2kilted# Enter container terminalexec_ros2kiltedStart the visualization monitoring tool in the new route network terminal: (RDK and Raspberry Pi need to run on virtual machine)
xxxxxxxxxxros2 launch road_net_route rviz_only.launch.py
Start the route network navigation core node in the container:
xxxxxxxxxxros2 launch road_net_route roadnet_nav2.launch.py

3. Sandbox Key Workstation Planning and Marking Practice
Workstation names within the sandbox support free customization. The following is the factory-recommended standard practical function point list:
Shelf 1 (Identifier: A)
Shelf 2 (Identifier: B)
Parking Lot 1 (Identifier: P1, robot departure and return)
Goods Warehouse (Identifier: C)
Goods Sorting Area (Identifier: D)
Shelf 3 (Identifier: E)
Shipping Area (Identifier: F)
Garbage Sorting Area (Identifier: G)
Garbage Bin Area: Including Food Waste Bin (K), Recyclable Bin (R), Other Waste Bin (O), Hazardous Waste Bin (H)

Marking
Execute marking in terminal using robot_control CLI tool:
xxxxxxxxxxrobot_control call-tool RecordMapLocation --name C_Area --symbol A
Important
Marking Rules (Must Read to Avoid Pitfalls):
Cart Head Facing: The cart head must be vertically facing the material table or shelf, with the distance from cart head to table edge maintained between 25 ~ 35 cm;
Full Frame: Before check-in, you can open the camera topic to view the current image, ensuring all brick cubes on the material table are in the middle lower half of the image without any obstruction;
No Localization Drift: Check whether the colored laser point cloud in RViz completely coincides with the black and white map outline. If there is slight deviation, first use the top
2D Pose Estimatetool to align, then press Enter to execute recording!
Typical Workstation Marking Practice Demo
Case 1: Marking "Shipping Area"
Remotely control the cart to the front of the shipping area, align the heading, with moderate distance:

Observe the onboard camera field of view, confirming that all cargo cubes on the shipping area mat can be completely and clearly captured:

Call the command in terminal to record the current cart
base_linkspatial pose to the map:
xxxxxxxxxxrobot_control call-tool RecordMapLocation --name ShippingArea --symbol B--name: Chinese full name, when the LLM hears "Go to shipping area" it will match directly by this name;--symbol: Abbreviated code for quick indexing and command line debugging.

Terminal prints successful save and shows the captured world coordinate values in real-time.

Case 2: Marking Different Classified Garbage Bin Workstations
Since the four classified garbage bins are placed side by side, the robotic arm angles and cart parking positions are slightly different when delivering different garbage. It is recommended to drive the cart to the front of each garbage bin at approximately 25cm one by one for independent recording:

For example, recording food waste garbage bin:
- Later will find corresponding garbage bin based on garbage category:
- HazardousWaste → Hazardous waste
- FoodWaste → Food waste
- OtherWaste → Other waste
- Recyclablewaste→ Recyclable waste
xxxxxxxxxxrobot_control call-tool RecordMapLocation --name Recyclablewaste --symbol KView and Verify Generated Map Mapping File
After all workstation marking is complete, data will automatically write to the following persistent configuration file:
xxxxxxxxxx~/yahboomcar_ros2_ws/dofbot_pro_ws/src/dofbot_pro_bringup/config/map_mapping.yaml# Installation run directory sync at:#~/yahboomcar_ros2_ws/dofbot_pro_ws/install/dofbot_pro_bringup/share/dofbot_pro_bringup/config/map_mapping.yamlRun the following command to view file content:
xxxxxxxxxxcat ~/yahboomcar_ros2_ws/dofbot_pro_ws/install/dofbot_pro_bringup/share/dofbot_pro_bringup/config/map_mapping.yamlTerminal will print the coordinate dictionary of all workstations in the entire sandbox:


At this point, the entire sandbox map has been completely endowed with "human-readable, machine-interpretable" embodied spatial semantics, and the robot is fully ready to accept complex factory comprehensive task scheduling!