Ask Your Question

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

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



+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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



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

Seen: 1,162 times

Last updated: Jun 13 '16