You are on page 1of 38

=

URDF and You


ROSCON 2012
David Lu!!
Ph.D. Student Washington University In St. Louis May 19, 2012
< >

Unified ROBOT DESCRIPTION FORMAT

http://www.ros.org/wiki/urdf
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

Outline
XML Specification

TOOLS

LIMITATIONS

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

Links and Joints


<?xml version="1.0"?> <robot name="linksandjoints"> <link name="tothepast" /> <link name="hogthrob" /> <joint name="expenditure" type="fixed"> <parent link="tothepast"/> <child link="hogthrob"/> </joint> </robot>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

TOPOLOGY
<?xml version="1.0"?> <robot name="dembones"> <link name="head" /> <link name="neck" /> <link name="shoulder" /> <link name="le t!arm" /> <link name="right!arm" /> <link name="back" /> <joint name="joint1" t"pe=" ixed"> <parent link="head"/> <child link="neck"/> </joint> <joint name="joint#" t"pe=" ixed"> <parent link="neck"/> <child link="shoulder"/> </joint> ... </robot>

Head

Neck

Shoulder

Left Arm

Back

Right Arm

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

EXAMPLE: Topology of LEWIS


Eyes PTU Part PTU Base
<robot name="le$is1"> <link name="base" /> <link name="bod"" /> <link name="ptu!base" /> <link name="ptu!piece" /> <link name="e"es" /> <joint name="base!to!bod"" t"pe=" ixed"> <parent link="base"/> <child link="bod""/> </joint> <joint name="bod"!to!base" t"pe=" ixed"> <parent link="bod""/> <child link="ptu!base"/> </joint> <joint name="base!to!piece" t"pe=" ixed"> <parent link="ptu!base"/> <child link="ptu!piece"/> </joint> <joint name="piece!to!e"es" t"pe=" ixed"> <parent link="ptu!piece"/> <child link="e"es"/> </joint> </robot> MAY19, 2012 David Lu!!

Body

Base
URDF and You ROSCON2012

Coordinate FRAMES and TF


)are t!(rame *hild!(rame 'ra slatio xyz (meters) Rotatio Quaternion in TF Roll Pitch Yaw (radians) in UR F
U dersta di g!tf "a#!$:!%%:&&am 'ull#!(oote

+!,!Red!-! Roll .!,!/ree !-!)itch 0!,!Blue!-! .aw


http://www.ros.org/wiki/tf

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

Geometry of joints

<origin/> <origin xyz="0 0 0 rpy=0 0 0/>

<origin xyz=".5 0 0 />

<origin xyz=".5 .4 0 />


URDF and You ROSCON2012 MAY19, 2012

<origin xyz=".5 .4 0 rpy=0 0 1.51/>


David Lu!!

EXAMPLE: Lewis' Geometry


<robot name="lewis2"> ... <link name="ptu_piece" /> <link name="eyes" /> <joint name="base_to_body" type="fixed"> <parent link="base"/> <child link="body"/> <origin xyz="0 0 .4"/> </joint> <joint name="body_to_base" type="fixed"> <parent link="body"/> <child link="ptu_base"/> <origin xyz=".14 -.007 .925"/> </joint> <joint name="base_to_piece" type="fixed"> <parent link="ptu_base"/> <child link="ptu_piece"/> <origin xyz="0 0 .055"/> ...
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

Publishing TF: Robot_DESCRIPTION PARAMATER


Parameter Server
!ro"ot#descri$tion

<param name="robot!description" text ile="%& ind roscon!urd '/urd /0()le$is.urd " />

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

10

PUBLISHING TF: Robot STATE Publisher


Parameter Server
!ro"ot#descri$tion

/1oi t2states

Robot State Publisher

/tf

<node name="robot!state!publisher" pkg="robot!state!publisher" t"pe="state!publisher" />


http://www.ros.org/wiki/ro3ot2state2pu3lisher
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

11

PUBLISHING TF: Joint STATE PUBLISHER


Parameter Server
!ro"ot#descri$tion

Joint state publisher

/1oi t2states

Robot State Publisher

/tf

<node name="joint!state!publisher" pkg="joint!state!publisher" t"pe="joint!state!publisher" />


http://www.ros.org/wiki/1oi t2state2pu3lisher
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

12

Flexible joints: Joint TYPE

(Planar % & ) (Floatin' % ( )

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

13

EXAMPLE: Lewis with FLEXIBLE JOINTS


<joint name="base_to_body" type="continuous"> ... <axis xyz="0 0 1"/> </joint> <joint name="body_to_base" type="fixed"> ... </joint> <joint name="base_to_piece" type="revolute"> ... <limit upper="3.14" lower="-3.14" velocity="1.0" effort="1.0"/> <axis xyz="0 0 1"/> </joint> <joint name="piece_to_eyes" type="revolute"> ... <limit upper=".54" lower="-.82" velocity="1.0" effort="1.0"/> <axis xyz="0 -1 0"/> </joint>
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

14

Joint State PUBLISHER with GUI


Parameter Server
!ro"ot#descri$tion

Joint state publisher

/1oi t2states

Robot State Publisher

/tf

<node name="joint!state!publisher" pkg="joint!state!publisher" t"pe="joint!state!publisher"> <param name="use_gui" value="True"/> </node>


URDF and You ROSCON2012 MAY19, 2012 David Lu!!

15

JOINT STATE PUBLISHER with SOURCES


/head2state

Joint state publisher

/1oi t2states

/3od#2state

<node name="joint!state!publisher" t"pe="joint!state!publisher" pkg="joint!state!publisher"> <rosparam param="source_list"> head_state! body_state" </rosparam> </node>
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

16

KINEMATICS with KDL


4inematics and "ynamics Li"rary

Forward Kinematics
5oi t State 'ra sform

Inverse Kinematics
http://www.ros.org/wiki/arm2 a6igatio

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

17

VISUALIZATION: GEOMETRY and MATERIAL


<link name="sphere"> <visual> <geometry> <sphere radius=".5"/> </geometry> <material name="red"> <color rgba="1 0 0 1"/> </material> </visual> </link> <link name="cylinder"> <visual> <geometry> <cylinder radius=".5" length=".2"/> </geometry> <material name="red" /> </visual> </link>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

18

VISUALIZATION: GEOMETRY and MATERIAL


<link name="box"> <visual> <geometry> <box size="1.5 .5 .25"/> </geometry> <material name="pattern"> <texture filename="package://roscon_urdf/logo.jpg"/> </material> </visual> </link> <link name="mesh"> <visual> <geometry> <mesh filename= "package://roscon_urdf/shoulder_pan.dae" /> </geometry> </visual> </link>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

19

VISUALIZATION: COLLADA DATA

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

20

VISUALIZATION: VISUAL ORIGIN


<robot name="origins"> <link name="base!link">...</link> <link name="leg"> <visual> <geometr"> <box si*e="0.+ .# 1.0"/> </geometr"> <origin xy#=$% % %$/> </visual> </link> <joint name="base!to!leg" t"pe="continuous"> <parent link="base!link"/> <child link="leg"/> <origin xy#="% % %"/> <axis x"*="0 1 0"/> </joint> </robot>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

21

VISUALIZATION: VISUAL ORIGIN


just the joint ORIGIN
<robot name="origins"> <link name="base!link">...</link> <link name="leg"> <visual> <geometr">...</geometr"> </visual> </link> <joint name="base!to!leg" t"pe="continuous"> <parent link="base!link"/> <child link="leg"/> <origin xy#="& '( '("/> <axis x"*="0 1 0"/> </joint> </robot>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

22

VISUALIZATION: VISUAL ORIGIN


joint ORIGIN + VISUAL ORIGIN
<robot name="origins"> <link name="base!link">...</link> <link name="leg"> <visual> <geometr">...</geometr"> </visual> <origin xy#=$& & '($/> </link> <joint name="base!to!leg" t"pe="continuous"> <parent link="base!link"/> <child link="leg"/> <origin xy#="& '( &"/> <axis x"*="0 1 0"/> </joint> </robot>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

23

VISUALIZATION: VISUAL ORIGIN


JUST VISUAL ORIGIN
<robot name="origins"> <link name="base!link">...</link> <link name="leg"> <visual> <geometr">...</geometr"> </visual> <origin x"*=,0 .- .-,/> </link> <joint name="base!to!leg" t"pe="continuous"> <parent link="base!link"/> <child link="leg"/> <axis x"*="0 1 0"/> </joint> </robot>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

24

EXAMPLE: LEWIS' VISUAL

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

25

CollisionS: GEOMETRY

<link name="base!link"> <visual> <geometr"> <mesh ilename= "package.//pr#!description/meshes/base!v0/base.dae"/> </geometr"> </visual> <collision> <geometr"> <mesh ilename= "package.//pr#!description/meshes/base!v0/base!/.stl"/> </geometr"> </collision> </link>

7otio !)la i g "a#!%:!%%:89!pm Suca !:!*hitta


; e<t=>

http://www.ros.org/wiki/ collisio 2e 6iro me t


URDF and You ROSCON2012 MAY19, 2012 David Lu!!

26

SIMULATION: Inertia and JOINT PROPERTIES


<link name="r!shoulder!pan!link"> <inertial> <mass value="#-.0112##"/> <origin x"*=").001 .0#( ).013"/> <inertia ixx=".3++" ix"=").0+1" ix*=").1#1" i""=".30(" i"*=").0-1" i**=" .#0("/> </inertial> ... </link> <joint name="r!shoulder!pan!joint" t"pe="revolute"> ... <limit e ort="20" velocit"="#.033" lo$er=")#.#3" upper=".01" /> <sa et"!controller k!position="100" k!velocit"="10" so t!lo$er!limit=")#.1( so t!upper!limit="0.-+"/> <d"namics damping="10.0"/> <calibration rising=").03-"/> </joint>
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

27

SIMULATION: Gazebo
<transmission name="r!shoulder!pan!trans" t"pe="pr#!mechanism!model/4imple5ransmission"> <joint name="r!shoulder!pan!joint"/> <actuator name="r!shoulder!pan!motor"/> <mechanical6eduction>+2.1--#(-#100</mechanical6eduction> </transmission> <ga*ebo re erence="r!gripper!r! inger!link"> <turn7ravit"8 >true</turn7ravit"8 > <mu1 value="-00.0"/><mu# value="-00.0"/> <kp value="1000000.0"/><kd value="1.0"/> </ga*ebo>

/a?e3o "a#!%:!$:89!pm Hsu!:!4oe ig


http://www.ros.org/wiki/ga?e3o
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

28

TOOLS: APIS and BASIC UTILITIES


C++
urdf2parser urdf2i terface ro3ot2state2pu3lisher urdf2parser check2urdf urdf2parser urdf2to2graph6i?

Python
urdf2p#tho 1oi t2state2pu3lisher

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

29

TOOLS: CONVERSION
)*++, , ()*++,"orati-e esi'n ,cti-ity) .-con (/ds0 ase0 "yu0 o"10 stl0 stl" and more) simmechanics#to#urd2 (), $ro'rams)

http://www.ros.org/wiki/collada2urdf http://www.ros.org/wiki/i6co http://www.ros.org/wiki/simmecha ics2to2urdf


URDF and You ROSCON2012 MAY19, 2012 David Lu!!

30

TOOLS: XACRO
STATISTICS
/544 /444 &544 &444 3544 3444 544 4 erratic create nao "&3 careo"ot rosie $r& 6um"er o2 +ines

http://www.ros.org/wiki/<acro
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

31

TOOLS: XACRO
LAUNCHING

<param name="robot!description" text ile="%& ind roscon!urd '/urd /0()le$is.urd " /> <param name="robot!description" command="%& ind xacro'/xacro.p" %& ind roscon!urd '/urd /11)xacro.xacro" />

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

32

TOOLS: XACRO
Properties
<xacro)property name="*idth" value="'+" /> <xacro)property name="bodylen" value="'," /> <link name="base!link"> <visual> <geometr"> <c"linder radius="-.*idth/+/" length="-.bodylen/"/> </geometr"> </visual> <collision> <geometr"> <c"linder radius="-.*idth/+/" length="-.bodylen/"/> </geometr"> </collision> </link> <joint name=,base!to!arm, t"pe=, ixed,> ... <origin x"*=,& -.bodylen/+/ &,/> </joint>

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

33

TOOLS: XACRO
FULL MACRO
<xacro)macro name="leg" params="prefix reflect"> <link name="-.prefix/_leg"> <visual> <geometr"> <box si*e="%9leglen: .# .1"/> </geometr"> <origin x"*="0 0 )%9leglen/#:"/> </visual> </link> <joint name="base!to!%9pre ix:!leg" t"pe=" ixed"> <parent link="base!link"/> <child link="%9pre ix:!leg"/> <origin xy#="-.reflect0*idth/ & '+(" /> </joint> </xacro)macro> <xacro)leg prefix="right" reflect="1" /> <xacro)leg prefix="left" reflect="21" />

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

34

LIMITATIONS: FOUR BAR LINKAGE


Blue

Red

/ree

.ellow

Red

Blue

/ree

.ellow
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

35

LIMITATIONS: LIMITED MODELING ABILITY


Una"le to 7odel8

Four Bar +in9a'e Pulleys!Ro$es

Functional :ears Flexi"le 7aterials )ertain Ty$es o2 ;oints Uno$timized )om$lex 7odels

URDF and You

ROSCON2012

MAY19, 2012

David Lu!!

36

LIMITATIONS: U is for Unified


PR2 ONLY
=imulation .n2o =ensor .n2o@ ,ctuation Params Plu'ins!Pac9a'es Physical Pro$erties 7aterials

URDF
To$o'ra$hy :eometry <isual ;oint Ty$es )ollision

SRDF/YAML
>ierarchy ?inematic )hains *ther =emantic .n2ormation

Parameterization
URDF and You ROSCON2012 MAY19, 2012 David Lu!!

7odular Pieces 37

URDF AND YOU

NAME: a-id +uAA Website: cse@wustl@edu!Bd-l3 Email: da-idluCwustl@edu REPOSITORY:! tinyurl@com!roscon%urd2 Twitter: C$ro"a"lyda-id Clewisthero"ot LINKS:
UR F To$olo'y :eometry +aunch <isual Tools *ther Pro$s@ Dacro

+imitations < >

You might also like