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

Positioning STL files in RVIZ

asked 2021-05-21 10:08:18 -0600

masterkey gravatar image

Hello,

I have a model with many links and joints in rviz. The whole thing is defined in a xacro file. I have now inserted a new link from an STL file. I would like to position this now.If I insert it with origin = 0 0 0 it is not where I would expect it to be. Is there a way in rviz to show the distance of the new link to an existing link? Of course I need the distances of the single x, y, and z coordinates and not the absolute distance.

Or how do I correctly position single stl parts?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-21 11:06:43 -0600

shonigmann gravatar image

When STL files are based on CAD that was defined about some arbitrary point (e.g. instead of using the origin as the center of the part, it is offset by some vector), it makes it a bit of a pain to include in your robot model. If you have access to the original CAD that the STL was exported from, then its easy enough to figure out what the center is and account for it.

When you don't have access to the CAD it can be trickier. For most cases (e.g. set the origin to the centroid of the model), my preferred method is using MeshLab, a powerful, free and open source mesh processing application (decent tutorial here).

If it is a one-off part, it might be just as fast to simply figure out the desired origin using trial and error, until the part is "close enough" to where you want it.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-05-21 10:08:18 -0600

Seen: 521 times

Last updated: May 21 '21