Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" ?>
- <!-- Lamp -->
- <robot name="arm" xmlns:xacro="http://www.ros.org/wiki/xacro">
- <!-- Lamp has 5 joints and 5 links -->
- <!-- Constants for robot dimensions -->
- <xacro:property name="height1" value="0.20" /> <!-- Link 1 -->
- <xacro:property name="height2" value="0.10" /> <!-- Link 2 -->
- <xacro:property name="width" value="0.02" /> <!-- Square dimensions (widthxwidth) of beams -->
- <xacro:property name="gap_link" value="0.0" /> <!-- Distance gap between each axis -->
- <xacro:property name="mass" value="1" /> <!-- arbitrary value for mass -->
- <xacro:property name="axel_offset" value="0.0" /> <!-- Space btw top of beam and the each joint -->
- <!-- Import Rviz colors -->
- <xacro:include filename="$(find luxo_descriptions)/descriptions/materials.xacro" />
- <!-- ***************** WORLD ********************* -->
- <!-- Used for fixing the robot to Gazebo 'base_link' -->
- <link name="world"/>
- <joint name="fixed" type="fixed">
- <parent link="world"/>
- <child link="link1"/>
- </joint>
- <!-- Base Link -->
- <link name="link1">
- <collision>
- <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
- <geometry>
- <box size="${width} ${width} ${height1}"/>
- </geometry>
- </collision>
- <visual>
- <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
- <geometry>
- <box size="${width} ${width} ${height1}"/>
- </geometry>
- <material name="orange"/>
- </visual>
- <inertial>
- <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
- <mass value="1"/>
- <inertia
- ixx="${mass / 12.0 * (width*width + height1*height1)}" ixy="0.0" ixz="0.0"
- iyy="${mass / 12.0 * (height1*height1 + width*width)}" iyz="0.0"
- izz="${mass / 12.0 * (width*width + width*width)}"/>
- </inertial>
- </link>
- <!-- ***************** JOINT1 ********************* -->
- <!-- Used for fixing link1 to link2 -->
- <joint name="joint1" type="continuous">
- <parent link="link1"/>
- <child link="link2"/>
- <origin xyz="0 ${gap_link} ${height1 - axel_offset}" rpy="0 0 0"/>
- <axis xyz="0 1 0"/>
- <dynamics damping="0.7"/>
- </joint>
- <link name="link2">
- <collision>
- <origin xyz="0 0 ${height2/2}" rpy="0 0 0"/>
- <geometry>
- <box size="${width} ${width} ${height2}"/>
- </geometry>
- </collision>
- <visual>
- <origin xyz="0 0 ${height2/2}" rpy="0 0 0"/>
- <geometry>
- <box size="${width} ${width} ${height2}"/>
- </geometry>
- <material name="black"/>
- </visual>
- <inertial>
- <origin xyz="0 0 ${height2/2}" rpy="0 0 0"/>
- <mass value="1"/>
- <inertia
- ixx="${mass / 12.0 * (width*width + height2*height2)}" ixy="0.0" ixz="0.0"
- iyy="${mass / 12.0 * (height2*height2 + width*width)}" iyz="0.0"
- izz="${mass / 12.0 * (width*width + width*width)}"/>
- </inertial>
- </link>
- </robot>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement