Skip to content

Tutorial: Creating Custom Terrain Map Files

dologan edited this page Aug 27, 2024 · 6 revisions

The current procedure to generate terrain maps compatible with both Gazebo (which needs a .stl) and the GridMap package (which needs a .ply) is as follows:

  1. Create the terrain map as a part in CAD software such as Solidworks
  2. Save the part file
  3. Save the part as a .stl with the following custom settings:
    • Output as: Binary
    • Units: Meters
    • Resolution: Custom, Define Maximum facet size: 0.20m
  4. Save the part as a .ply with the same settings above
  5. Create a (.world) file using flat.world as a template. Modify lines 26 and 31 to reflect the world name of your custom map.
  6. Generate a model.config file with meta information about the terrain map. See Here
  7. Put all four files (.sldprt, .ply, .stl, .world) in a folder with the same name as the part
  8. Put a copy of the folder in quad-sdk/quad_simulation/gazebo_scripts/worlds
  9. Make sure the initial states of the robot in spirit_gazebo.launch are within the feasible region of the terrain. This can be adjusted in the .world file under the pose argument. Try setting gui:=true while launching quad_gazebo.launch to visualize the relative position of the world to the robot.
  10. (For RML users: upload that part to Box)