ROS2 NAV2 map not served - help requested
Ros2 Humble, new install of Ubuntu 22.04 on Intel desktop.
Working through NAV2 tutorials with real robot - custom. Have successfully mapped the house multiple times using custom URDF and the following:
ros2 launch robot_description display.launch.py
ros2 launch nav2_bringup navigation_launch.py
ros2 launch slam_toolbox online_async_launch.py
During the mapping, had zero issues with the map being built being served and and shown on RVIZ2.
With mapping done, attempting navigation the map server doesn't seem to work. The map frame is never issued and the map never shows on RVIZ, That attempt is using:
ros2 launch nav2_bringup bringup_launch.py use_sim_time:=False autostart:=True map:='/home/b/map.yaml'
There is no issue with file path as the startup clearly finds and reads the map yaml and file:
[component_container_isolated-1] [INFO] [1674403535.435682167] [map_server]: Configuring
[component_container_isolated-1] [INFO] [map_io]: Loading yaml file: /home/b/map.yaml
[component_container_isolated-1] [DEBUG] [map_io]: resolution: 0.05
[component_container_isolated-1] [DEBUG] [map_io]: origin[0]: -4.22
[component_container_isolated-1] [DEBUG] [map_io]: origin[1]: -4.81
[component_container_isolated-1] [DEBUG] [map_io]: origin[2]: 0
[component_container_isolated-1] [DEBUG] [map_io]: free_thresh: 0.25
[component_container_isolated-1] [DEBUG] [map_io]: occupied_thresh: 0.65
[component_container_isolated-1] [DEBUG] [map_io]: mode: trinary
[component_container_isolated-1] [DEBUG] [map_io]: negate: 0
[component_container_isolated-1] [INFO] [map_io]: Loading image_file: /home/b/map.pgm
[component_container_isolated-1] [INFO] [1674403535.438891662] [behavior_server]:
[component_container_isolated-1] behavior_server lifecycle node launched.
[component_container_isolated-1] Waiting on external lifecycle transitions to activate
[component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information.
[component_container_isolated-1] [DEBUG] [map_io]: Read map /home/b/map.pgm: 266 X 230 map @ 0.05 m/cell
[component_container_isolated-1] [INFO] [1674403535.457025407] [map_server]: Activating
[component_container_isolated-1] [INFO] [1674403535.457180554] [amcl]: Received a 266 X 230 map @ 0.050 m/pix
[component_container_isolated-1] [INFO] [1674403535.457192287] [map_server]: Creating bond (map_server) to lifecycle manager.
[component_container_isolated-1] [INFO] [1674403535.570334635] [lifecycle_manager_localization]: Server map_server connected with bond.
[component_container_isolated-1] [INFO] [1674403535.587049624] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
It looks like the costmap plugin gets the correct map:
[component_container_isolated-1] [INFO] [1674403535.663900677] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 266 X 230 at 0.050000 m/pix
but eventually end up with repeating errors here complaining about 'map' frame not existing, and the map never shows up on the map topic. Looking at the TF frames there is also no 'map' frame shown.
[component_container_isolated-1] [INFO] [1674403535.916757777] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
Things I've tried:
- I tried for hours to use a stand alone map server but never get past the configure stage with that.
- Have remapped the house just in case the map file was corrupted, it looks fine in GIMP.
- Have been careful to source everything.
- The local cost map works and appears in RVIZ and can be seen updating as laser data changes.
- I even tried adding a static transform from odom to map just to see if that was preventing the map from showing up on the 'map' topic.
Really appreciate guidance with this.