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

Load stl to urdf file

asked 2020-03-01 14:39:50 -0600

Aviad gravatar image

updated 2020-03-01 14:40:15 -0600

Hello, I made a model of my robot by SolidWorks and saved it as STL file. From some reason I can't see it in Rviz and it doesn't complains for errors in my shell. I converted it to .dae filt but there is an error that there is no mesh. Someone know somthing about it? I need to save it like something else? Tnx Aviad

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-02 04:42:34 -0600

fvd gravatar image

updated 2020-03-02 04:44:30 -0600

You generally use an STL (or other mesh) in these ways in ROS:

  1. As a geometric representation of a link in a URDF.

  2. As a collision object that is published to the MoveIt Planning Scene.

  3. As an object that is spawned in Gazebo.

What are you trying to do, and what behavior do you expect? How are you attempting to visualize the object? Are any errors or warnings printed on the terminal?

Please ask a more detailed question as described here.

edit flag offensive delete link more


Hi, I want it for a geometric representation. I have a stl file for wheels and I can see it on Rviz. It is a model which I didn't create. I don't figure out why it is not working for me. I put the stl inside the meshes folder withe mt wheel.stl file and changed in the urdf file in the right place.

Aviad gravatar image Aviad  ( 2020-03-02 15:16:29 -0600 )edit

Please update your original post with this information to make it helpful to other people who will read this. "I can't figure out why it's not working" is not helpful information. You need to describe what you are doing, where it is going wrong, and what you tried to fix it. Be explicit, don't assume people know what you are talking about. What is the problem if you managed to change the STL in "the right place"? Be more explicit please.

fvd gravatar image fvd  ( 2020-03-02 22:25:50 -0600 )edit

Taking into account my past experience with meshes in Rviz and Gazebo I recommend you to export the STL from SolidWorks, then import this file to Blender. From Blender export as collada (.dae).

Then, you will be able to use it with:

 <mesh scale="1 1 1" filename="file:///$(find ros_pkg)/meshes/mesh.dae" />
Weasfas gravatar image Weasfas  ( 2020-03-04 08:19:47 -0600 )edit

Question Tools



Asked: 2020-03-01 14:39:50 -0600

Seen: 1,647 times

Last updated: Mar 02 '20