0
$\begingroup$

enter image description hereI'm currently using the TurtleBot2 on Ubuntu 22.04 Humble and successfully generated a map with ros2 launch nav2_bringup navigation_launch.py. I was able to use the command ros2 launch nav2_bringup bringup_launch.py map:=/name/of/path.yaml several times (it was showing the map sometimes and wasnt showing the map sometimes aswell) but now whenever I am launching the command it tells me

[component_container_isolated-1] [INFO] [1695317742.382350265] [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

Opening the rviz config /nav2_bringup/rviz2/nav2_default_view.rviz results in Rviz2 telling me, that no map is received. I was trying to change the QoS aswell, which didnt have an impact at all.

I have looked into rqt_graph and /map was connected to global_cost_map, also I checked rqt and /map was not receiving any messages when I have monitored it in rqt.

Can someone help me out please?

$\endgroup$

2 Answers 2

3
$\begingroup$

The nav2 map server is the one that puts the map into the /map topic, the map is published once during launch and not continuously published. If you would like to see the map again you could use the map server services, more info is available here: https://github.com/ros-planning/navigation2/blob/main/nav2_map_server/README.md

More information can be provided if you share the logs.

$\endgroup$
2
  • $\begingroup$ So I have to write a params file, which contains the yaml file of my map (if so how do I hand over the path of my map file to the params file?) and afterwards have to start said params file while my bringup is launching? Because I have already tried this command ros2 service call /map_server/load_map nav2_msgs/srv/LoadMap "{map_url: /ros/maps/map.yaml}" while my bringup was running but it kept telling me that its waiting for the service to be available. Unfortunately I am at home right now, so my setup including Turtlebot and workspace is not available at the moment,Ill update logs tommorrow! $\endgroup$
    – DJ1NN
    Commented Sep 21, 2023 at 19:32
  • $\begingroup$ Failure of the service call already indicates the parts of nav stack are crashing, hence logs are needed. The bringup_launch.py also has a params_file argument through which a param file can be given , the default one is here. $\endgroup$
    – akchobby
    Commented Sep 21, 2023 at 20:12
2
$\begingroup$

I have found the mistake, I have renamed my yaml and png map files and forgot to adjust the new png name in the yaml file. Thank you very much for the help still akchobby!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.