(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Creating a map using Solidworks

Description:

Tutorial Level:

General Information

This tutorial shows you how you can create a map for naviagtion and an map for simulation using Solidworks.

  • You need a full version of Solidworks with with PhotoView 360 enabled

  • The "stl"-file is needed for simulation
  • The "bmp"-file is needed for navigation

Prepare 3D Part

  • dowloand and open the template: map_template_v01.SLDPRT

  • edite the 3D part so that it fits 1:1 with the desired map
  • note the following colors:
    • white areas are free to operate
    • black areas are walls
    • grey areas are not to be operated in
    • one pixel is equivalent to 5 cm, therfore walls have to be at least 10 cm thick to really exist later on.

Camera View

  • switch to the camera menu

camera menu

  • right click on the "kamera1" and check the box "Kameraansicht"

camera view

Note: alway keep the box "kamera sperren" checked, otherwise you might rotate the camera instead of rotating the part

  • you should now have a top down view of your part / map with the origin of the coordinate system exactly in the lower left corner of the field of view.

Note: adjusting the camera settings will not be neccesary in most cases, it is only neccessary if your map is bigger than the 100x100 meter map in the template

  • right click on the "kamera1" an press "kamera bearbeiten" to edit the camera settings if neccesary
    • if you adjust the camera, make sure that the edges of the camera view stay algined with the orginal coordinate system.
    • if needed, adjsut the size of the field of view
    • one pixel is supossed to equal 5 cm, hence if you change the cameras filed of view you
      • have to later on have to adjust the resolution of the bitmap
    • make sure you do not check the box "perspective" when adjusting the camera

Execute Rendering

  • switch to the rendering tool

rendering tool

Note: adjusting the resolution or other settings for the rendering is only neccessary if you have adjusted the camera previously

  • go to options if you have to adjust the resolution
    • output as "bmp"
    • no greyscale output
    • adjust the resolution of the bitmap if neccesary, in our example to 4000x4000

rendering settings

  • end rendering
  • save the bmp-file

end rendering

Save Stl-file

The map template includes an additional coordinate system. If you do not need a special position for the origin of the coordinate system in your stl-file you don't have to do anything here.

  • edit the coordinate system to move it to you desired position
  • go to "save as" and choost STL format
  • go to options and chekc the boxes:
    • output: binary
    • unit: Meter
    • STL-Ausgabedatei nicht auf positiven Raum ├╝bertragen
    • Alle Komponenten einer Baugruppe in eine Datei speichern.
    • Ausgabe Koordinatensystem: Koordinatensystem1

stl-file options

  • save the stl-file

Additional Drawing

Usually it is very helpful to create a drawing or screeshot that shows (you and especially your colleagues) where the additional coordinate system is located in reference to the corene of the bmp-file. The drawing should also show the distance between the corner of the bmp-file and some characteristic spot in the map.

additional drawing

Wiki: cob_tutorials/Tutorials/Creating a map using Solidworks (last edited 2018-04-19 06:52:28 by JohannesStoll)