Robotics StackExchange | Archived questions

Load stl to urdf file

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

Asked by Aviad on 2020-03-01 15:39:50 UTC

Comments

Answers

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.

Asked by fvd on 2020-03-02 05:42:34 UTC

Comments

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.

Asked by Aviad on 2020-03-02 16:16:29 UTC

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.

Asked by fvd on 2020-03-02 23:25:50 UTC

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:

<geometry>
 <mesh scale="1 1 1" filename="file:///$(find ros_pkg)/meshes/mesh.dae" />
</geometry>

Asked by Weasfas on 2020-03-04 09:19:47 UTC