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

How to refresh automatically global costmap in Rviz

asked 2014-08-29 06:17:34 -0600

alex920a gravatar image

updated 2014-08-29 14:42:30 -0600

ahendrix gravatar image

Hello! I'm wondering how to automatically refresh the global costmap visualization on Rviz. The problem is: I have an initial global costmap and I add an obstacle in gazebo. At this point the global costmap in Rviz should update, but it doesn't. Is there any refresh option? I'm sure that at low level the global costmap is updating since if I disable and then enable the global costmap button, Rviz visualize the new costmap.

edit retag flag offensive close merge delete

Comments

What topics are you subscribing to? What ROS distro?

David Lu gravatar image David Lu  ( 2014-08-29 07:46:35 -0600 )edit

I'm subscribing I'm rvizto /move_base/global_costmap/costmap and I'm using ros hydro in Ubuntu 12.04lts

alex920a gravatar image alex920a  ( 2014-08-29 08:39:55 -0600 )edit

It should be updating then. I'm not sure what the error is.

David Lu gravatar image David Lu  ( 2014-08-29 10:33:21 -0600 )edit

The error is that in Rviz it's not updating the global costmap but ramains the old one. If I disable and enable angain the costmap in Rviz it visualize. I don't want to do this trick every time but I want that Rviz does it automatically

alex920a gravatar image alex920a  ( 2014-08-30 06:12:13 -0600 )edit
2

The costmap_2d has a parameter called publish_frequency (default: 0.0)

fherrero gravatar image fherrero  ( 2014-09-01 01:45:58 -0600 )edit

yes! There was the default value! I simply changed it to 5.0 and it works! Thanks a lot :)

alex920a gravatar image alex920a  ( 2014-09-03 12:32:53 -0600 )edit

Good call Fernando.

David Lu gravatar image David Lu  ( 2014-09-03 13:43:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2014-09-05 02:03:50 -0600

fherrero gravatar image

The costmap_2d has a parameter called publish_frequency (default: 0.0)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-29 06:17:34 -0600

Seen: 1,490 times

Last updated: Sep 05 '14