How to troubleshoot Rviz2 not receiving map from cartographer?
Rviz2 doesn't receive anymore Turtlebot 3 lidar readings, nor the map being built by cartographer. Cartographer makes the map allright, in fact I can have it saved in the end, and topics /scan
and /map
have messages going over them; still Rviz2 doesn't seem to receive them, nor display them. The same happens both with Gazebo and with a real Turtlebot.
Running Foxy under Ubuntu 20.04.
These are the commands I run (taken from the Turtlebot 3 e-manual). The setup.bash
from /opt/ros/foxy
and my workspace are already sourced in every shell I use, as well as TURTLEBOT3_MODEL
is set to burger
.
# Start gazebo
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
# Start cartographer and Rviz2
ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True
# Start the teleoperation node
ros2 run turtlebot3_teleop teleop_keyboard
# Drive around and save the map
ros2 run nav2_map_server map_saver_cli -f ~/map
I am attaching a screenshot of Gazebo and Rviz2, and the output of view_frames.py
. Also pasting the output of Gazebo and Cartographer to console.
Anything I should try, or additional information I can collect to troubleshoot the issue?
[UPDATE] Since the problem occurred right after Foxy got updated during a round of sudo apt upgrade
, I think the issue is likely related to this https://github.com/ros2/rviz/issues/782
Asked by fgfanta on 2021-10-09 15:13:37 UTC
Answers
I have encountered the same problem. My workspace consists of these repos, all on the head of foxy-devel branch: turtlebot3, turtlebot3_msgs, turtlebot3_simulations.
If I launch waffle_pi which has a camera, I can even see the camera output in rqt, but like yourself not in rviz (likewise no /scan). Incidentally, I also tried to install turtlebot3 and turtlebot3_msg via apt, and turtlebot3_simulations still from source, and with this setup rviz works. I did not managed to do more thorough tests yet.
I checked package.xml for apt installed turtlebot3 and it's 2.1.1, by the tags is 9 months behind, and the problem appeared probably in the commits since then.
Asked by vane on 2021-10-09 19:02:03 UTC
Comments
It might be related to this https://github.com/ros2/rviz/issues/782
Asked by fgfanta on 2021-10-10 03:38:13 UTC
Good find, the changes in turtlebot repos are minor, more likely a rviz issue. ROS was up to date in my first test (build from sources), and I actually used a docker image for the second test (apt binaries), which was not up to date, so that might explained why the likely older Rviz worked.
Asked by vane on 2021-10-10 04:31:29 UTC
Comments