ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

New package: convert 2D maps to Gazebo worlds

I’ve made a node that will subscribe to OccupancyGrid (map) messages and export a 3D mesh with obstacles corresponding to occupied cells of the map, as if all the occupied pixels were extruded upwards. The package also contains basic config/launch files to open Gazebo and import the mesh. My goal with this package is to make it easy to create simulated environments based on real-world maps.

The GitHub repo is at – see the README for more details. I hope this is useful! Let me know if you have any feedback or questions.


Very cool! Would be great to see a roadmap on the readme for features you’d like to add and pictures of what it looks like now.

I used your package in a different way. To create gazebo world using 2D images.
I made it thinking of a fast map prototype to experiment with navigation algorithms.

I get an image file, convert to OccupancyGrid, and use your package to generate it.
It works really well.


Very cool! Can’t wait to try it as soon as the lockdown is over! :+1:t2:

Holy Schmolly this is a great idea!!! How can we make this cooler. I love this. Can you outline some of the places you see this used and its intended use? I can imagine lots of use cases for this around testing and validation. this seems useful for testing and validating Nav systems especially ones with 2D Lidar - what kinds of things do you see it good for? Can we somehow extrapolate this concept and get image data as well?

This package has many ways to evolve. The idea of any sequence of data become gazebo elements is awesome. The first feature that I see is using some information to create different size walls.

In the occupancy grid msg, every element has a value, could use this as the info.

Cool work!
Here is another package which also has the function to convert a png to a gazebo world. However its problem is the world file generated by this package is pretty huge.

1 Like

This is awesome man!

One suggestion for the README though-- add some pictures! :slight_smile:

Pictures are the #1 thing (besides code) that developers look for when they land on a Github repo. A picture instantly shows the value and capability of your project. You’d be surprised how many folks simply “bounce” off of a repo page simply because it doesn’t quickly convey the super powers it gives the reader.

Super cool idea!