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

How to troubleshoot Rviz2 not receiving map from cartographer?

asked 2021-10-09 15:13:37 -0500

fgfanta gravatar image

updated 2021-10-10 03:40:06 -0500

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

screenshot

rqt

frame

Gazebo's output

Cartographer's output

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-10-09 19:02:03 -0500

vane gravatar image

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.

edit flag offensive delete link more

Comments

It might be related to this https://github.com/ros2/rviz/issues/782

fgfanta gravatar image fgfanta  ( 2021-10-10 03:38:13 -0500 )edit

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.

vane gravatar image vane  ( 2021-10-10 04:31:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-10-09 15:13:37 -0500

Seen: 1,302 times

Last updated: Oct 10 '21