ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to generate .stl files

asked 2011-09-24 20:40:54 -0500

VN gravatar image

updated 2011-09-24 23:13:11 -0500

How to generate .stl files for my robot? As far as I understand I need to create CAD model for each link and then export it as .stl file (binary not ascii?). Which one (Autodesk Inventor, SolidWorks...etc) provides binary .stl files? 'll the stl files from the CAD software work as it is OR do I need to change anything before using in URDF file?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
4

answered 2011-09-24 23:31:08 -0500

To answer your questions:

  • yes, you need to create CAD models of your robot links
  • the mesh formats that ROS understands are STL, DAE and Ogre
  • both Autodesk Inventor and SolidWorks can export to STL format
  • ROS (RViz etc.) understands both binary and ASCII STL
  • SolidWorks produces binary STL files that look like ASCII STL files, thereby confusing ROS; but these files can be fixed (search previous questions tagged "stl")
  • you can use ivcon to convert between binary and ASCII STL, and other formats
  • the STL files from the CAD software should work as they are; if you need to do some tweaking (rescaling, rotating, whatever), MeshLab comes in very handy
edit flag offensive delete link more

Comments

I was able to open my mesh files in RViz, but not Gazebo. In Meshlab, Filters->Remeshing->Quadric Edge Collapse Decimation I reduced the number of faces to < 5000 for each mesh. The results were not pretty, but I am able to open CAD files with Gazebo and RViz now. Saved the resulting stl as binary.
Thomas D gravatar image Thomas D  ( 2011-10-07 14:28:52 -0500 )edit
2

answered 2011-09-24 23:17:11 -0500

Yes, you need to create a CAD model (for each link if they have DOF).

You can get binary stl files with SolidWorks, just marking the option when exporting the .stl file. You can use them straight from the CAD just take into account that the reference coordinates and units may change from SolidWorks to RViz.

If you just need a fast model you can use Google's SketchUP, I wrote this short how-to SketchUp to STL page.

If you find any exporting issues check out Meshlab

edit flag offensive delete link more
0

answered 2011-09-25 05:07:30 -0500

VN gravatar image

Thanks a lot. Its very helpful.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-09-24 20:40:54 -0500

Seen: 4,949 times

Last updated: Sep 25 '11