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

converting between costmap_2d::Costmap2D and nav_msgs::OccupancyGrid

asked 2016-06-13 13:01:54 -0500

petermitrano gravatar image

Is there an established or convenient way to convert between these two? I don't see any methods that suggest this is possible.

The manual approach of course is to create a message and populate it by iterating over all the cells in the Costmap2D, but this seems like something that might already exist.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-06-13 18:14:44 -0500

spmaniato gravatar image

That functionality seems to be part of costmap_2d_publisher See Costmap2DPublisher::prepareGrid()

But I don't know of a more general-purpose function either.

edit flag offensive delete link more

Comments

3

+1 for finding the function that does it. This seems like something that should be added as a method to Costmap2D

petermitrano gravatar image petermitrano  ( 2016-06-14 10:44:35 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-06-13 13:01:54 -0500

Seen: 1,556 times

Last updated: Jun 13 '16