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

URDF question: origin

asked 2014-04-18 02:27:54 -0500

Yantian_Zha gravatar image

updated 2014-04-18 04:02:03 -0500

gvdhoorn gravatar image

Can anyone tell me

<origin xyz="${x_loc} ${y_loc} ${z_loc}" ...>

means what? In my view it is number like 0,1 that should be after xyz=, but not the ${x_loc} thing.

Additionally, I'm trying to mount an arm on turtlebot in URDF, is it OK to add turtlebot pan's origin parameter to origin parameter of arm base link? Or there exist other ways?

Thanks so much!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-04-18 07:40:46 -0500

Tom Moore gravatar image

Re: your first question, you can do two things. First, you can put in actual values, e.g.,

<origin xyz="0.13 0.4 1.2">

Alternatively, you can use xacro. What you posted was URDF with xacro markup in it. With xacro, you can define values like this:

<xacro:property name="x_loc" value="0.13" />
<xacro:property name="y_loc" value="0.4" />
<xacro:property name="z_loc" value="1.2" />

...and then do

<origin xyz="${x_loc} ${y_loc} ${z_loc}">

See this tutorial:

http://wiki.ros.org/urdf/Tutorials/Us...

edit flag offensive delete link more

Comments

Thanks, Tom. But the second question is more confusing and important for me. Would you pls help me out of this? Any suggestions or ideas are welcomed!

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-19 04:41:21 -0500 )edit

I apologize, but I don't quite understand what your second question is asking. I'm afraid I haven't worked with the TurtleBot before. If you're trying you mount an arm on the robot, I'm guessing you'd define the link and then define the joint. Can you post some URDF code?

Tom Moore gravatar image Tom Moore  ( 2014-04-22 03:52:30 -0500 )edit

No sorry at all. The link between arm and turtlebot has been found. But I still cannot understand deeply of the tricks described in the Tutorial you provided. I haven't learnt XML before. I don't know whether this learning matters more? Or do you have other advices? Thanks!

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-22 04:41:48 -0500 )edit

I would: 1. Go through an XML tutorial. 2. Go through the regular URDF tutorials, but ignore anything to do with xacro. Perhaps put together some sample robot models. This will help you understand why xacro is so useful. 3. Go through the xacro/URDF tutorial.

Tom Moore gravatar image Tom Moore  ( 2014-04-22 05:47:50 -0500 )edit

Thanks for your help!

Yantian_Zha gravatar image Yantian_Zha  ( 2014-04-22 12:18:23 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-04-18 02:27:54 -0500

Seen: 198 times

Last updated: Apr 18 '14