Creating a Gazebo map from the 2D occupancy map, created by arena-tools can be broken down into six steps
❶ Transform the pgm
file into an svg
❺ (Optinal) simplify the world for higher simulation speed
❻ Include the mesh into the world file and save the file
Use Incspace to transform the image to an svg
pgm.to.svg.mp4
Open Blender, clear the scene and import the svg
import.svg.mp4
When working with arena-tools worlds have a size of 25x25m. You can determine this by multiplying the resolution (pixel per meter) with the number of pixels.
scale+extrude.mp4
Right-click and select, convert to mesh
export.to.mesh.mp4
The gazebo simulation-speed can be increased by decreasing the model complexity in this case the number of wires. This can be done with the decimate tool.
NOTE: Don't reduce the number to much, so that structural integrety of the map stays intact
reduce.size.mp4
Create a new world folder under: simulator_setup/worlds/WORLD_NAME
. Export the mesh object in dae
format under the name map.dae
. Download the .world
file into that folder. You can run the code below:
roscd simulator_setup/worlds/WORLD_NAME wget https://raw.githubusercontent.com/ignc-research/arena-tools/main/map_to_gazebo/map.world