Rviz: no map received
Hello everyone,
My setup is as follows, I'm using a Docker container with Ubuntu 20.04 and Ros2 Foxy. I'm currently getting started with Navigation2 and I'm following the tutorial with the TB3. When I run
ros2 launch nav2_bringup tb3_simulation_launch.py
everything seems to be working as expected. Meaning that Gazebo loads and so does Rviz. As explained in the tutorial I make the 2D pose estimation. After which all the transforms are computed ( I also checked this with tf2_tools) and sensor data starts to be show in Rviz.
However, I cannot visualize the map and I get the warning "No Map received". I've been trying to figure the cause of this problem out for a while, but I can't seem to find a solution. The map_server map_server
is up and running, I checked whether it is active through ros2 lifecycle get /map_server
. I also checked whether the correct yaml file is being read, by looking at the file in /tmp
pointed to by ps ax | grep nav2_map_server
and it is indeed correct.
Does anyone have an idea what the issues might be? Just to complete this, the /map
topic does show up in the topic list, it also says that there is 1 Publisher and 3 Subscriptions. However if I try to echo
or use hz
it seems that nothing is being published on the topic, even though the map_server
is indeed active. Am I missing something?
I have the exact same problem, and would love to know the answer also, if somebody has a solution to this problem!
In my case I noticed, that the map is published only once in the beginning by the map_server node after node's startup. If the RViz is started after this, it won't show anything because it never gets the map message.