Ask Your Question
0

Load stl to urdf file

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

Aviad gravatar image

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

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
0

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

fvd gravatar image

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

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

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.

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

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 -0500 )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:

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 1,065 times

Last updated: Mar 02 '20