ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to build a map from given map image in gazebo?

asked 2021-10-30 02:40:11 -0500

HuyBuiVN gravatar image

updated 2021-11-08 08:44:57 -0500

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

edit retag flag offensive close merge delete



There are a few things you need to consider such as the scale of the image vs scale in Gazebo. Then one approach you can use is using opencv is to detect the lines in the map and convert them into blocks in gazebo. You will need to take into account the thickness of the wall for example.

osilva gravatar image osilva  ( 2021-11-01 16:00:30 -0500 )edit

Would it be possible to share a picture of the campus map just to help guide you with this. Also not a ROS question do perhaps check in the Gazebo forum

osilva gravatar image osilva  ( 2021-11-01 16:01:55 -0500 )edit
osilva gravatar image osilva  ( 2021-11-01 16:03:12 -0500 )edit

Hi osilva, thanks for your reply. I sent an email to you.

HuyBuiVN gravatar image HuyBuiVN  ( 2021-11-04 23:27:17 -0500 )edit

@HuyBuiVN, Can you please! share the map over here so it can be helpful for other members and can participate in this question.

I have given you enough credit to upload the images.


Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-11-05 06:24:57 -0500 )edit

I have update my image, which i want to build a world to display in gazebo and put a model (robot car) on it.

HuyBuiVN gravatar image HuyBuiVN  ( 2021-11-08 08:46:32 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-11-05 05:58:40 -0500

osilva gravatar image

Hi @HuyBuiVN

Hi @HuyBuiVN I read your email and understand you can't make the picture public. You have made progress on rendering in Blender, so I will share my answer so other benefits as well.

Since you already have 3D rendering in Blender using openstreetmap, next I suggest to convert from Blender to Gazebo.

These are a couple links that might help you how to do this. It's not my expertise but I am sure you can figure it out.

Once you have the world in Gazebo, then you can research launching Gazebo worlds with ROS. Gazebosim has many tutorials on how to do this:

Finally once the world is launched in Gazebo, you can load your robot.

edit flag offensive delete link more

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: 2021-10-30 02:40:11 -0500

Seen: 72 times

Last updated: Nov 08 '21