2

I have a picture of a university campus and want to make a similar map in a gazebo, how to build such a map in a gazebo, I have searched but no answer. I'm using ros1 noetic.

  • 1
    This is impossible to answer with how much detail is given. What kind of picture is it? What do you mean by “map” in gazebo? – BTables Oct 31 '21 at 03:11
  • 1
    This picture is in 2D format, which is like a screenshot of particular area on google map. And i want to convert that picture to a map in ros to work with my robot car. – Huy Bùi Quốc Oct 31 '21 at 04:47
  • 1
    What do you mean by a map? Like a costmap? Or just a backdrop on gazebo? Because if it's the former that's not something you can do. You'd have to manually create it. – BTables Oct 31 '21 at 21:21
  • 1
    Thanks for the reply, I found the question exactly, I use blender to create my own world and how to import it in ros to display my robot on. Thanks – Huy Bùi Quốc Nov 05 '21 at 04:00

1 Answers1

2

Not Sure if that is what you meant, but there is a Ros package called map2gzebo, its an open source which is used to convert 2D image to gazebo map.

After installing the package, in order to create the new map, you need to publish your image to ros topic, you can do it using map_server.

Then in order to convert the image to gazebo map run:

roslaunch map2gazebo map2gazebo.launch

In order to see the map on gazebo run:

roslaunch map2gazebo gazebo_world.launch

For deeper information look at map2gazebo