ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rviz: no map received

asked 2021-01-09 06:33:18 -0500

stamatic gravatar image

updated 2022-03-25 17:32:01 -0500

lucasw gravatar image

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?

edit retag flag offensive close merge delete

Comments

I have the exact same problem, and would love to know the answer also, if somebody has a solution to this problem!

ahopsu gravatar image ahopsu  ( 2021-08-10 06:22:36 -0500 )edit

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.

ahopsu gravatar image ahopsu  ( 2021-08-10 06:56:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-10 06:46:46 -0500

stamatic gravatar image

I somehow managed to solve the issues. Rather than directly installing the turtlebot3 the package through

sudo apt install ros-ros2-distro-turtlebot3*

I cloned the single repositories from ROBOTICS-GIT and then built them in my workspace. I cloned the following ones:

git clone -b branch-name https://github.com/ROBOTIS-GIT/turtle...
git clone -b branch-name https://github.com/ROBOTIS-GIT/turtle...
git clone -b branch-name https://github.com/ROBOTIS-GIT/turtle...
git clone -b branch-name https://github.com/ROBOTIS-GIT/Dynami...
git clone -b branch-name https://github.com/ROBOTIS-GIT/hls_lf...

Then still installed the following packages:

apt install -y ros-ros2-distro-navigation2 ros-ros2-distro-navigation-bringup
apt install -y ros-ros2-distro-gazebo-ros-pkgs

Then afterwards run the following two commands in two separate terminal windows and things should work as expcted

ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
ros2 launch turtlebot3_navigation2 navigation2.launch.py use_sim_time:=true

I hope that helps!

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2021-01-09 06:33:18 -0500

Seen: 2,042 times

Last updated: Jan 09 '21