Costmap not updating Rviz2

asked 2021-06-24 01:40:49 -0500

cjoshi17 gravatar image

Hello,

I am running ROS Foxy on Ubuntu 20.4. I have setup the navigation 2 package and I can see the costmaps being plotted in Rviz2. However, when I turn off the viewing on any one of the costmaps and then turn it back on, I get the warning of no map received. I run ros2 topic hz on the costmap topics and I can see that the messages are coming but in Rviz2 it gives me the warning of no map received. I can't upload images since I don't have the required points. Please let me know if anyone needs further clarification.

This is the hz output after I have switched off and turned on the viewing in Rviz2

ros2 topic hz /local_costmap/costmap output
average rate: 1.776
  min: 0.447s max: 0.649s std dev: 0.08523s window: 3
average rate: 1.789
  min: 0.447s max: 0.649s std dev: 0.07144s window: 5
average rate: 1.802
  min: 0.447s max: 0.649s std dev: 0.06182s window: 7
average rate: 1.769
  min: 0.447s max: 0.649s std dev: 0.05782s window: 9
average rate: 1.759
  min: 0.447s max: 0.649s std dev: 0.05288s window: 11
average rate: 1.696
  min: 0.447s max: 0.852s std dev: 0.08997s window: 13
average rate: 1.706
   min: 0.447s max: 0.852s std dev: 0.08559s window: 15
edit retag flag offensive close merge delete

Comments

1

hmm... I haven't had this issue myself. But something to quickly check is that the QoS settings in RVIZ match the QoS settings of your costmap publisher. RVIZ in ROS2 is picky about QoS when images are being published / displayed. Perhaps its the same with costmaps? Though it doesn't really clear up why you can see the costmap in the first place... Can you confirm that the messages being published have data inside, and that they aren't just empty messages?

shonigmann gravatar image shonigmann  ( 2021-06-24 14:45:10 -0500 )edit

Hi,

Firstly, thanks for your feedback. I tried to change the QoS settings in Rviz2 to best effort after reading up about it on a few github issues page. Before doing this I found out that when I turn off my costmaps in Rviz2 and also turn off my Pointcloud and then turn everything back on, all the costmaps come back. I changed all of their settings to best effort and now I don't have to turn off and turn on the Pointcloud everytime I turn off and turn on my costmaps. Thanks again for your help

cjoshi17 gravatar image cjoshi17  ( 2021-06-25 00:01:27 -0500 )edit