Opening Files in Gazebo

468 views
Skip to first unread message

camp .

unread,
Jul 15, 2021, 7:26:06 PM7/15/21
to HomeBrew Robotics Club
    I'm trying to open a model in Gazebo. The file extension is .stl and it opens fine from FreeCad. It's the Neato dae file Ralph Gnauck created some time ago. When I try to "Add Path" including the file, it stays dim and will no allow me to select and open. I converted the "dae" to an "stl" and it seems to be okay. Does it need to be "sdf" for gazebo? I can't seem to find anything to convert stl to sdf, but I thought Gazebo worked with .stl
 

Kevin Chow

unread,
Jul 15, 2021, 10:31:51 PM7/15/21
to HomeBrew Robotics Club
I think that stl files are just the mesh, but a sdf is the mesh with a bunch of other properties that Gazebo would use for the simulation.  So I think you'll need a complete sdf or urdf for Gazebo.

camp .

unread,
Jul 16, 2021, 1:37:46 AM7/16/21
to HomeBrew Robotics Club
> So I think you'll need a complete sdf or urdf for Gazebo.

    I imported the .stl body into the Gazebo Model Editor as a custom shape and then moved it into Gazebo. You're right though there's a lot of work to do getting all the sdf elements into place. I've played around with the sam_bot as described in ROS2 "Setting Up The URDF." I'll try and create a set of wheels for this neato model.
 
neato_editor
https://photos.app.goo.gl/H1b1E8gWHKea9JQq9
 
neato_gazebo
https://photos.app.goo.gl/rKTT5hm21npXQ4wd9
 
Setting Up The URDF
https://navigation.ros.org/setup_guides/urdf/setup_urdf.html
 
This might be useful too but the .stl wouldn't load into the Model Editor: https://github.com/pietervanzutven/neato
 
Thanks,
Camp

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/111ab174-0b5b-4cf1-b43c-4d93958a212fn%40googlegroups.com.

Chris Albertson

unread,
Jul 16, 2021, 11:40:23 AM7/16/21
to hbrob...@googlegroups.com
How large is the STL file? For us in Gazebo, you want to dramatically reduce the number of triangles.   All you need to do is capture the general shape.   Some STL files can have 40,000 triangles but maybe 100 or so are enough.



--

Chris Albertson
Redondo Beach, California

camp .

unread,
Jul 16, 2021, 2:22:48 PM7/16/21
to hbrob...@googlegroups.com
> How large is the STL file?
 
The .stl I was able to open as a custom shape in Model Builder is 15.7kb and the one that doesn't open is 973.8kb so there may be something to that. My issue is more with the convoluted manner in which Gazebo opens files. From the "Add Path" selector to the distinction between "Gazebo" and "Model Editor." I can't open the .stl in Gazebo or the Model Editor directly. After converting it from a .dae to a .stl I had to open it as a "Custom Shape" in Model Editor and then save it. I notice when you save the model it creates a directory with the model name and two files are in the directory, "model.config" and "model.sdf."
 
Thanks,
Camp

Sergei Grichine

unread,
Jul 16, 2021, 7:22:41 PM7/16/21
to hbrob...@googlegroups.com
Not sure if that could help - but for 3D printing I use an old free copy of Netfabb (now https://www.autodesk.com/products/netfabb/overview?lang=1) to clean up STLs. It closes "open triangles" and fixes "impossible shapes" - which is often produced by CAD software. It also dramatically reduces the number of triangles without compromising the shape. 



--
Best Regards,
-- Sergei

camp .

unread,
Jul 16, 2021, 9:11:21 PM7/16/21
to hbrob...@googlegroups.com
"The more you know, the more you realize you don't know." - Aristotle
 

Steve " 'dillo" Okay

unread,
Jul 17, 2021, 9:02:16 PM7/17/21
to HomeBrew Robotics Club
Also take a look at Meshlab, which can reduce triangle counts, close & flip faces, etc.

Steve " 'dillo" Okay

unread,
Jul 17, 2021, 9:09:56 PM7/17/21
to HomeBrew Robotics Club
SDF is "Scene Description Format", sort of like URDF, but with some enhancements. STL files are "meshes" that are loaded as part of an SDF file.
If you have a robot_description directory, the STL or DAE files would go in robot_description/meshes .

HTH,
'dillo

On Thursday, July 15, 2021 at 4:26:06 PM UTC-7 ca...@camppeavy.com wrote:
Reply all
Reply to author
Forward
0 new messages