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

How to do OccupancyGrid map compression?

asked 2014-10-21 04:58:05 -0500

Huibuh gravatar image

updated 2014-10-21 14:18:09 -0500

Hello fellow devs,

I am running move_base on a robot which is connected via WLAN to a laptop running rviz for visualization. The problem is that map updates (nav_msgs/OccupancyGrid and nav_msgs/OccupancyGridUpdate messages from costmap_2d) saturate the wireless link. Hence, I am looking for a method to compress the map data. Ideally, the solution should be compatible with rviz, but a simple sensor_msgs/Image would also suffice.

Looking around what is available, I found no solution which is working under Hydro/Indigo:

hector_compressed_map_transport is outdated. It has been written before the introduction of nav_msgs/OccupancyGridUpdate. It can only deal with nav_msgs/OccupancyGrid messages, which are only published once by costmap_2d.

compressed_visualization_transport is also outdated and doesn't handle OccupancyGridUpdate messages.

To use either of the two, my idea would be to to assemble a complete occupancy grid from the initial OccupancyGrid plus the incemental OccupancyGridUpdate, and feed the result to hector_compressed_map_transport or compressed_visualization_transport. (Pretty much what rviz does on client side, see rviz map_display.cpp line 463)

However, as this is a very hacky solution, I would like to find out if there are any better solutions out there.

Any help is appreciated :-)

edit retag flag offensive close merge delete


I think that the bandwidth reduction from the update messages probably reduced the need for continued development of compressed_map_transport.

Is your link that thin? Have you tried reducing the publish rate for map updates?

paulbovbel gravatar image paulbovbel  ( 2014-10-22 08:52:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-22 01:51:26 -0500

We transmit OccupancyGrid messages using the topic_proxy which behind the scenes uses blob_tools. During "blobification", data can optionally be compressed using BZ2 (see the text in second link). The compression ratio on real-life grid maps is very high there, reaching from 50:1 up to 100:1.

edit flag offensive delete link more

Question Tools



Asked: 2014-10-21 04:58:05 -0500

Seen: 1,638 times

Last updated: Apr 22 '16