Robotics StackExchange | Archived questions

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 nav2bringup tb3simulation_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 tf2tools) 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 mapserver 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?

Asked by stamatic on 2021-01-09 07:33:18 UTC

Comments

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

Asked by ahopsu on 2021-08-10 06:22:36 UTC

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.

Asked by ahopsu on 2021-08-10 06:56:24 UTC

Answers

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/turtlebot3.git
git clone -b branch-name https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b branch-name https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
git clone -b branch-name https://github.com/ROBOTIS-GIT/DynamixelSDK.git
git clone -b branch-name https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git

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!

Asked by stamatic on 2021-08-10 06:46:46 UTC

Comments