<?xml version="1.0"?>
<robot name="my_robot">
<link> ... </link>
<link> ... </link>
<link> ... </link>
<joint> .... </joint>
<joint> .... </joint>
<joint> .... </joint>
</robot>
<link name="link_name">
<link name="base_link">
<visual>
<geometry>
<cylinder length="0.01" radius="0.2"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder length="0.03" radius="0.2"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</link>
<visual name="name">
시각적 형체를 정의
<origin xyz="0 0 0" rpy="0 0 0" />
기준 프레임에 대한 visual element의 프레임을 정의
<geometry>
: 모양을 정의
<box size="1 1 1" />
: 육각형 모양<cylinder length="1" radius="1" />
: 원기둥 모양<sphere radius="1" />
: 구 모양<material name="material_name">
: 렌더링을 정의
<color rgba="1 1 1 1" />
: 0~1 범위를 갖는 red/green/blue/alpha 의 값을 지정<texture filename="path" />
: 텍스쳐 파일 지정<collision name="name">
물리적 히트박스를 설정
<origin xyz="0 0 0" rpy="0 0 0" />
기준 프레임에 대한 collision element의 프레임을 정의
<geometry>
: 모양을 정의
<box size="1 1 1" />
: 육각형 모양<cylinder length="1" radius="1" />
: 원기둥 모양<sphere radius="1" />
: 구 모양<inertial>
물리적 특성을 정의
<origin xyz="0 0 0" rpy="0 0 0" />
기준 프레임에 대한 inertial element의 프레임을 정의
<mass value="1">
: 질량을 설정
<inertia ixx= "1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
: 관성 모멘트를 설정
<joint name="name" type="type">
<joint name="pan_joint" type="revolute">
<parent link="base_link"/>
<child link="pan_link"/>
<origin xyz="0 0 0.1"/>
<axis xyz="0 0 1" />
<limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
<dynamics damping="50" friction="1"/>
</joint>
<orgin>
<origin xyz="0 0 0" rpy="0 0 0" />
부모링크의 프레임에 대한 자식링크의 프레임을 정의<parent>
<parent link="base_link"/>
: 부모링크 설정<child>
<child link="pan_link"/>
: 자식링크 설정<axis>
<axis xyz="0 0 1" />
: joint의 축 설정<dynamics>
<dynamics damping="50" friction="1"/>
: 물리적 특성 설정<limit>
<limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
: 제한 설정<?xml version="1.0"?>
<robot name="ex_urdf_pan_tilt">
<link name="base_link">
<visual>
<geometry>
<cylinder length="0.01" radius="0.2"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
<material name="yellow">
<color rgba="1 1 0 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder length="0.03" radius="0.2"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx= "1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</link>
<joint name="pan_joint" type="revolute">
<parent link="base_link"/>
<child link="pan_link"/>
<origin xyz="0 0 0.1"/>
<axis xyz="0 0 1" />
<limit effort="300" velocity="0.1" lower="-3.14" upper="3.14"/>
<dynamics damping="50" friction="1"/>
</joint>
<link name="pan_link">
<visual>
<geometry>
<cylinder length="0.4" radius="0.04"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0.09"/>
<material name="red">
<color rgba="0 0 1 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder length="0.4" radius="0.06"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0.09"/>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</link>
<joint name="tilt_joint" type="revolute">
<parent link="pan_link"/>
<child link="tilt_link"/>
<origin xyz="0 0 0.2"/>
<axis xyz="0 1 0" />
<limit effort="300" velocity="0.1" lower="-4.71239" upper="-1.570796"/>
<dynamics damping="50" friction="1"/>
</joint>
<link name="tilt_link">
<visual>
<geometry>
<cylinder length="0.4" radius="0.04"/>
</geometry>
<origin rpy="0 1.570796 0" xyz="0 0 0"/>
<material name="green">
<color rgba="1 0 0 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder length="0.4" radius="0.06"/>
</geometry>
<origin rpy="0 1.570796 0" xyz="0 0 0"/>
</collision>
<inertial>
<mass value="1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
</inertial>
</link>
</robot>