[Unitree GO2 EDU]Problem at RViz while mapping and failed to save SLAM map

Hi, I got problems while scanning the map and saving it. As can be seen in the screenshot, this is the RViz2 during the map scanning period. The scanned map can be seen while there is error with robot model, as the tf between the robot components and map is missing. So that the position of robot and its components in visualization are not shown.

Another Problem is after all the map is scanned. I used both ros2 run nav2_map_server map_saver_cli -f /opt/mybotshop/src/mybotshop/go2_navigation/maps/custom_map_2 --ros-args --remap map:=/$GO2_NS/map and the instruction with out --ros-args on the manual. Both of them show that there is a timeout problem and the mapsave is failed.

unitree@go2-unit-41097:~$ ros2 run nav2_map_server map_saver_cli -f /opt/mybotshop/src/mybotshop/go2_navigation/maps/custom_map_2 --ros-args --remap map:=/$GO2_NS/map
[INFO] [0000091975.343170752] [map_saver]: 
	map_saver lifecycle node launched. 
	Waiting on external lifecycle transitions to activate
	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[INFO] [0000091975.343603552] [map_saver]: Creating
[INFO] [0000091975.343967328] [map_saver]: Saving map from 'map' topic to '/opt/mybotshop/src/mybotshop/go2_navigation/maps/custom_map_2' file
[WARN] [0000091975.344128704] [map_saver]: Free threshold unspecified. Setting it to default value: 0.250000
[WARN] [0000091975.344260832] [map_saver]: Occupied threshold unspecified. Setting it to default value: 0.650000
[ERROR] [0000091977.369201376] [map_saver]: Failed to save the map: timeout
[INFO] [0000091977.369399360] [map_saver]: Destroying

The second problem seems to be solved with adding ROS_DOMAIN_ID at the beginning. However the instruction only works without --ros-args --remap map:=/$GO2_NS/map. Also when I add ROS DOMAIN ID at the beginning, it does not work.

unitree@go2-unit-41097:/opt/mybotshop/src/mybotshop/go2_navigation/maps$ ROS_DOMAIN_ID=10 ros2 run nav2_map_server map_saver_cli -f /opt/mybotshop/src/mybotshop/go2_navigation/maps/custom_map2 --ros-args --remap map:=/$GO2_NS/map
[INFO] [0000092835.642526688] [map_saver]: 
	map_saver lifecycle node launched. 
	Waiting on external lifecycle transitions to activate
	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[INFO] [0000092835.642917568] [map_saver]: Creating
[INFO] [0000092835.661865440] [map_saver]: Saving map from 'map' topic to '/opt/mybotshop/src/mybotshop/go2_navigation/maps/custom_map2' file
[WARN] [0000092835.662037408] [map_saver]: Free threshold unspecified. Setting it to default value: 0.250000
[WARN] [0000092835.662097568] [map_saver]: Occupied threshold unspecified. Setting it to default value: 0.650000
[ERROR] [0000092837.690591136] [map_saver]: Failed to save the map: timeout
[INFO] [0000092837.705291264] [map_saver]: Destroying

You can set domain id for the specific terminal prior via:

export ROS_DOMAIN_ID=10
1 Like