ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

URDF origins tags

asked 2016-03-03 05:38:14 -0600

LiohAu gravatar image

I'm building my first urdf, and I noticed that I can define the origin tag on the visual, collision elements but also on the link element. So I am wondering if there's a best practice ?

For instance, if I have two 10cm x 10cm x 10cm boxes one on the other, I could define the origin on the link tag with y = 5cm and the origin of the visual/collision tags at y = 5cm too but this is not really DRY, so I would probably only use the origin of the link tag only with y = 10cm, but which solution is better ?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
4

answered 2016-03-03 09:19:31 -0600

David Lu gravatar image

Blatant self promotion: check out my ROSCon talk. http://wustl.probablydavid.com/entry0...

edit flag offensive delete link more

Comments

Nice one :)

Akif gravatar image Akif  ( 2016-03-03 09:28:36 -0600 )edit

If I understood correctly what you are saying at 17:30, using only the origin of the joint tag is not a problem for fixed joints right ? Also, in rviz, when you show the axis, which axis does it shows, the joint one ?

LiohAu gravatar image LiohAu  ( 2016-03-03 10:43:36 -0600 )edit

Using only the origin tag is probably not a problem. It shows the joint origin, which is the origin of the child link.

David Lu gravatar image David Lu  ( 2016-03-06 21:03:18 -0600 )edit

Since an URDF with a single link also displays axis, I assume that an implicit joint is created for the first link in an URDF right ? And if i'm right, this joint between that URDF link and an hardcoded link created/hardcoded somewhere by the ROS system ?

LiohAu gravatar image LiohAu  ( 2016-03-08 09:33:34 -0600 )edit

i have one urdf file and my link is laying on ground and i want to make it normal to the ground how i can do may u help me sir ?

lagankapoor gravatar image lagankapoor  ( 2018-02-23 03:50:23 -0600 )edit
1

answered 2016-03-03 06:02:31 -0600

It depends on how you define the visual and collision elements. For example, you have a base_link which is in the center of the robot. If the origin of the robot mesh is not defined at the center, you will see that the mesh does not match for the actual definition.

Example: let us say that you have a cylinder-shaped robot, and base_link origin is in the center of the bottom face. If your cylinder mesh is centered in the center of mass (for instance) of the cylinder, you would have to move the origin of the visualization/collision in the Z direction by height/2.

edit flag offensive delete link more

Comments

i have one urdf file and my link is laying on ground and i want to make it normal to the ground how i can do may u help me sir ?

lagankapoor gravatar image lagankapoor  ( 2018-02-23 03:50:16 -0600 )edit
1

@lagankapoor you have to rotate it. I would say that is a very basic URDF feature, so if you follow the tutorials carefully you will see how to do it. If you continue having issues, open a new question instead of using the comment section of a different question.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2018-04-27 06:45:16 -0600 )edit

@Javier V. Gómez Sir i have solved that issue after this and create my URDF file with Solidworks .

lagankapoor gravatar image lagankapoor  ( 2018-04-27 23:52:48 -0600 )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

1 follower

Stats

Asked: 2016-03-03 05:38:14 -0600

Seen: 744 times

Last updated: Mar 03 '16