Before starting mapping, please follow Remote Login to access the 106 host and run dpkg -l slam in the terminal to check the slam package version. The map deployment method described in this section applies to slam(<2.1.0). If the version is v2.1.0 or later, refer to Map Deployment (v2.1.0 and Later).
During mapping, do not operate the robot dog with vigorous movements or block the LiDAR, otherwise mapping may fail.
Before starting mapping, open a terminal and run the top command to check computational resources. If other programs are using too many resources, close them with: sudo kill [PID].
Ensure mapping is not enabled. If it is, first complete the save map and close program steps below. Ensure the localization/navigation program is not running. If it is, kill it with:
Terminal window
bash~/jy_cog/system/scripts/kill_nav.sh
Before starting the mapping program, check if there are existing maps in the /jy_cog/system/map folder. The folder will be cleared when the mapping program starts. If needed, move existing maps to another folder beforehand and move them back when needed.
Narrow stairs, extremely open outdoor areas, and ultra-large venues are not supported for mapping.
This version of the mapping program is suitable for indoor scenes up to 200m × 100m.
Please start the mapping program while the robot dog is standing still.
Open a terminal and enter the following command to start the indoor mapping script:
Terminal window
cd~/jy_cog/system/scripts
bashstart_mapping.sh
After starting the mapping program, keep the robot dog standing still for 5~8 seconds, then remotely control it to move steadily through the mapping area. During scanning, check in RViz whether the robot’s localization is normal and whether the point cloud drifts.
After the robot has scanned the entire mapping area, press Ctrl+C in the terminal running the mapping program to close it. The program will automatically generate a grid map and save it to /jy_cog/system/map. To preview the grid map during scanning, enter the following in a new terminal:
Terminal window
cd~/jy_cog/system/scripts
bashpub_save_occ_map.sh
If you cannot close the mapping program properly, run the following command to kill the mapping process:
If the grid map was not generated following the above steps, you can convert the scanned point cloud map to a grid map offline after closing the mapping program:
Terminal window
cd~/jy_cog/system/scripts
./trans_save_occ_map.sh
If the grid map is not satisfactory, you can configure grid map parameters in the params.yaml file under jy_cog/system/conf/slam/pcd2map.
Parameter
Meaning
Data Type
minh
Minimum height of captured point cloud (can be negative)
double
maxh
Maximum height of captured point cloud (can be negative)
double
leaf_size
Point cloud resolution; larger values generate grid maps faster but sparser
double
If mapping still fails, please contact technical support.
Please start the mapping program while the robot dog is standing still.
Multi-floor mapping does not use the start_mapping.sh script from single-floor mapping, as that script starts both point cloud and grid map programs simultaneously. Multi-floor mapping requires starting the two programs separately.
Open a terminal and enter the following command to start the point cloud mapping program:
The true parameter at the end enables Rviz. Change it to false if Rviz is not needed.
This command starts the point cloud mapping program, which must remain running until all floors are mapped. Do not stop and restart it along with the grid map program.
After starting the point cloud mapping program, keep the robot dog standing still for 5~8 seconds.
When starting to scan a new floor, start the grid map program and specify the map filename:
The command takes a parameter at the end (separated by space) specifying the filename for the grid map being built. When building multiple grid maps, specify different filenames for each.
It is recommended to name the navigation startup layer’s grid map file “jueying”, as navigation loads the map named “jueying” by default.
Grid maps can only be built when the point cloud mapping program is running.
After starting the grid map program, remotely control the robot dog to scan the current floor. When finishing each floor and preparing to map the next, press ctrl+c to close the grid map program (the current floor’s grid map will be saved automatically). Then start the grid map program again on the spot (with a different map filename) to begin mapping the next floor.
It is recommended to close and restart the grid map program on the stair landing connecting two floors, and ensure the landing is reachable on both grid maps.
After completing all floors, press ctrl+c to close both the grid map and point cloud map programs. The last floor’s grid map and the complete point cloud map will be saved automatically.
If the grid map does not fully match the actual environment or you need to manually define passable areas, use GNU Image Manipulation Program to edit the .pgm file: right-click the .pgm file, select open with Other Application, then select GNU Image Manipulation Program and click Select.
If the GIMP toolbar is not visible on both sides, press Tab to show it. The toolbar provides foreground and background color tools. Foreground sets the brush color, background sets the eraser color. In grid maps, black represents obstacles (impassable areas), white represents passable areas, and gray represents unknown areas. Use the brush or eraser to add or remove black areas. Hold Shift and click left button to draw straight lines. Hold Ctrl and click left button to sample colors.
For multi-floor mapping, ensure the connecting platform between floors is reachable on both grid maps. If the map contains stairs or slopes that need to be passable, they may be identified as obstacles (shown in black) during mapping. Edit the map to change the passable areas of stairs or slopes to white.
After editing, select File - Overwrite jueying_map.pgm from the top menu to overwrite the original file (do not select File - Save). When closing the program, a save prompt will appear; click Discard Changes.
For multi-floor mapping, after building grid maps, navigate to the broker or robot_server folder under ~/jy_cog/system/conf and modify the configuration file map.toml: adjust the map list according to the format based on the grid maps built for each floor. When dispatching navigation tasks later, use map IDs to identify each floor’s grid map.
This version of the mapping function simultaneously builds point cloud and 2D grid maps. For multi-floor scenes, multiple grid maps require manual specification when floors change. This version supports single-floor small indoor scenes (50m50m), multi-floor small indoor scenes (50m50m10 floors), and single-floor large scenes (500m500m).
During mapping, do not operate the robot dog with vigorous movements or block the LiDAR, otherwise mapping may fail.
Before starting mapping, open a terminal and run the top command to check computational resources. If other programs are using too many resources, close them with: sudo kill [PID].
Ensure mapping is not enabled. If it is, first complete the save map and close program steps below. Ensure the localization/navigation program is not running. If it is, kill it with:
Terminal window
bash~/jy_cog/system/scripts/kill_nav.sh
Indoor-outdoor mixed large scenes, smooth tunnels, smooth long corridors, relatively open scenes (depends on LiDAR model), high dynamic environments, extreme vibration or vigorous movement, and long-distance without loop closure (or very few loop closures) are not supported.
fast: Quickly build point cloud and grid maps (including multi-layer grid map building, no loop closure detection, no keyframe map generation)
indoor: Indoor multi-floor, narrow or small scene point cloud and grid map building (with loop closure detection, with keyframe map generation)
outdoor: Outdoor relatively open large scene point cloud and grid map building (with loop closure detection, with keyframe map generation)
The mapping program creates a folder for each scene under /home/ysc/jy_cog/system/maps. Folder naming format: [custom name]-date-time. Each folder contains a complete point cloud map (jueying.pcd), default grid map (jueying.pgm) and parameter file (jueying.yaml). If a scene has multiple grid maps, they are prefixed with jueying followed by a sequence number starting from 1, e.g., jueying1 (jueying.pgm and jueying.yaml are still retained). Keyframe maps (containing keyframe point clouds and their pose files) may also be stored under the details folder.
The localization/navigation program defaults to using maps under /home/ysc/jy_cog/system/map. The map folder is a symlink pointing to a specific map folder. To change the symlink target, delete the existing map folder and run:
Terminal window
cd~/jy_cog/system# Navigate to directory (optional)
ln-smaps/folder_namemap# Replace folder_name with actual name; this creates a symlink named map pointing to a folder under maps
# Result: Parameters omitted, default fast mode, results in "ProjectName-LocationName-date-time" folder under maps, applied immediately, RViz open
Trailing parameters can only be omitted from the end, not skipping any. Parameters are read in order.
After starting the mapping program, keep the robot dog standing still for 10 seconds, then remotely control it to move steadily through the mapping area. During scanning, check in RViz whether the robot’s localization is normal and whether the point cloud drifts.
After scanning the entire area, press Ctrl+C in the terminal running the mapping program. In fast mode, the grid map will be automatically generated and saved. In indoor/outdoor mode, only keyframe point clouds and poses are saved; you need to run the following commands to build the full point cloud map and grid map:
Terminal window
bash/home/ysc/jy_cog/system/scripts/construct_full_map.sh# Build full point cloud map
Please start the mapping program while the robot dog is standing still.
Multi-floor mapping generates multiple grid maps for different floors based on point cloud data. As floors change during scanning, use the save_and_restart_occ_mapping.sh script to convert scanned floor point cloud data to grid maps and restart the grid map program.
Open a terminal and enter the following command to start the point cloud mapping program:
Terminal window
bash/home/ysc/jy_cog/system/scripts/start_mapping.sh [map_name] [apply_immediately][mapping_mode][open_rviz]# Refer to single-floor mapping for parameter descriptions
This command starts the point cloud mapping program, which must remain running until all floors are mapped. Do not stop and restart it along with the grid map program restarts.
After starting the mapping program, keep the robot dog standing still for 10 seconds, then remotely control it to move steadily through the mapping area.
When starting to scan a new floor, manually run the following command at the starting position (if save_and_restart_occ_mapping.sh is running, first press Ctrl+C to stop it) to save the previous floor’s grid map and restart the grid map program for a new grid map:
The first floor’s grid map and parameter file are saved as jueying.pgm and jueying.yaml. Each subsequent run of save_and_restart_occ_mapping.sh creates a new grid map named jueying+sequence number, starting from 1, e.g., jueying1.pgm.
Grid maps can only be built when the point cloud mapping program is running.
It is recommended to close and restart the grid map program on the stair landing connecting two floors, and ensure the landing is reachable on both grid maps.
After restarting the grid map program, remotely control the robot dog to scan the new floor. After all scanning is complete, press ctrl+c and the mapping program will stop and automatically save the point cloud and grid maps.
Press ctrl+c only once; pressing it again will send a kill signal and the map will not be saved.
Please start the mapping program while the robot dog is standing still.
Multi-floor mapping generates multiple grid maps for different floors. As floors change during scanning, use the set_floor_label.sh script to segment floors and specify floor numbers.
Open a terminal and enter the following command to start the point cloud mapping program:
Terminal window
bash/home/ysc/jy_cog/system/scripts/start_mapping.sh [map_name] [apply_immediately][mapping_mode][open_rviz]# Refer to single-floor mapping for parameter descriptions
This command starts the point cloud mapping program, which must remain running until all floors are mapped.
After starting the mapping program, keep the robot dog standing still for 10 seconds, then remotely control it to move steadily through the mapping area.
In indoor/outdoor mode, when reaching a new floor’s starting position, specify the new floor number:
Natural number (0, 1, 2, etc.): Specifies the new floor number
-1: Do not build a grid map for this floor
-2: New floor number = previous floor number + 1
The final grid maps are named “jueying+floor number”, e.g., jueying1.pgm. Floor 0 is named jueying.pgm.
Floor numbers in map files do not necessarily correspond to actual floor numbers.
It is recommended to name the navigation startup layer’s grid map “jueying”, as navigation loads the map named “jueying” by default.
Grid maps can only be built when the point cloud mapping program is running.
It is recommended to close and restart the grid map program on the stair landing connecting two floors, and ensure the landing is reachable on both grid maps.
After specifying the new floor number, remotely control the robot dog to scan the new floor. After all scanning is complete, press ctrl+c in the mapping terminal. The program will stop with only keyframe point clouds and poses saved. You need to run the full point cloud map and grid map building programs:
Terminal window
bash/home/ysc/jy_cog/system/scripts/construct_full_map.sh# Build full point cloud map
The GUI will open. Specify the map name, mapping mode, and other parameters, then click to start mapping.
After starting the mapping program, keep the robot dog standing still for 10 seconds, then remotely control it to move steadily through the mapping area.
For multi-floor grid maps, when reaching a new floor’s starting position:
In fast mode: Click the [New Floor] button. The new floor’s grid map and parameter file will be named “jueying+floor number”, e.g., jueying1.pgm/jueying1.yaml. The floor number auto-increments from the previous floor. Floor 0 is named jueying.
In indoor/outdoor mode: Enter the new floor number in the text box, then click [Specify New Floor]. The grid map will be named “jueying+specified floor number”, e.g., entering 4 saves as jueying4.pgm/jueying4.yaml. Floor 0 is named jueying.pgm/jueying.yaml. Clicking [Skip Floor] will not create a grid map for that floor.
Click End Mapping in the GUI to automatically save the map, build the full point cloud map, and build the grid map. After completion, a close button will appear; press it to exit the GUI.
For multi-floor mapping, after building grid maps, navigate to the broker or robot_server folder under ~/jy_cog/system/conf and modify map.toml. Refer to Map Configuration (Before v2.1.0) for details.
For larger scenes, the mapping program cannot guarantee one-pass mapping. Record data packages and iteratively adjust parameters for the best quality map.