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

Can turtlebot_simulator be loaded with a PGM map?

asked 2014-11-17 12:56:15 -0600

BlitherPants gravatar image


I have a Turtlebot 2 on ROS Hydro, and I am working on an algorithm for smart autonomous navigation through a known map. I have a map of the building I wanted to test in PGM form, obtained from running Gmapping. In real life, I would take this map, boot up my 'bot, load AMCL for localization within my PGM map, and then start my navigation algorithm.

I'd like to also be able to do this in the simulation world, i.e., start the simulator, load my map into Gazebo, start AMCL with the same map, and start my algorithm and watch the simulated robot drive around.

Currently I cannot find any way to load the PGM into Gazebo or convert it into a .world file. Is this something that's already available or would I need to write a custom program to create a world file where each black pixel is an obstacle?

Thanks in advance!

edit retag flag offensive close merge delete


Yeah I was curious about this. It would be really nice feature to test sensors and robot logics in simulation.

jihoonl gravatar imagejihoonl ( 2014-11-19 00:01:03 -0600 )edit

So you don't think this option is yet available?

BlitherPants gravatar imageBlitherPants ( 2014-11-19 08:58:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-19 09:15:41 -0600

David Lu gravatar image

I would recommend checking out stage_ros which can read in PGMs.

It's also possible Stage's more modern cousin STDR can, but I haven't investigated the package at all.

edit flag offensive delete link more


Is turtlebot_stage only available on Indigo? I have a Hydro installation and can't seem to find it...

BlitherPants gravatar imageBlitherPants ( 2014-11-19 09:41:38 -0600 )edit

Should be on hydro.

David Lu gravatar imageDavid Lu ( 2014-11-19 09:51:20 -0600 )edit

I can roscd to stage_ros but not turtlebot_stage, and I can't find the appropriate package using apt-get

BlitherPants gravatar imageBlitherPants ( 2014-11-19 10:23:23 -0600 )edit

There are no released package in hydro. But you should be able to checkout turtlebot_simulator hydro-devel branch which includes turtlebot_stage.

jihoonl gravatar imagejihoonl ( 2014-11-19 23:15:56 -0600 )edit

Thanks @jihoonl! I'll check that out.

BlitherPants gravatar imageBlitherPants ( 2014-11-21 08:51:44 -0600 )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

1 follower


Asked: 2014-11-17 12:56:15 -0600

Seen: 663 times

Last updated: Nov 19 '14