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

Revision history [back]

here is my URDF:

<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="http://ros.org/wiki/xacro" name="pioneer3dx"> <property name="M_PI" value="3.14159"/>

<include filename="$(find robina_description)/urdf/gazebo.urdf.xacro"/> <include filename="$(find robina_description)/urdf/robina_calibration.xacro"/>

<link name="base_link"> <inertial> <mass value="3.5"/> <origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0.177" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/chassis.stl"/> </geometry> <material name="ChassisRed"> <color rgba="0.851 0.0 0.0 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.01 0.01 0.01"/> </geometry> </collision> </link>

<link name="top_plate"> <inertial> <mass value="0"/>
<origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/top.stl"/> </geometry> <material name="TopBlack"> <color rgba="0.038 0.038 0.038 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_top_joint" type="fixed">
    <origin xyz="0.003 0 0.41" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="top_plate"/>
</joint>


<link name="ptu_base">
 <inertial>
       <mass value="1"/>
       <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
        <origin xyz="0.003 0 0.274" rpy="0 0 0"/>
     </inertial>
     <visual>
       <origin xyz="0 0.015 0"/>
       <geometry>
         <box size="0.04 .07 .05"/>
       </geometry>
     </visual>
     <collision>
       <origin xyz="0 0.015 0"/>
     <geometry>
       <box size="0.04 .07 .05"/>
     </geometry>
     </collision>
     </link>
<link name="ptu_piece">
<inertial>
  <mass value="1"/>
  <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
  <origin/>
</inertial>
<visual>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
  <!--<material name="black"/>-->
</visual>
<collision>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
</collision>

</link> <joint name="pan" type="continuous"> <origin xyz="0 0 0"/> <axis xyz="0 0 1"/> <parent link="ptu_base"/> <child link="ptu_piece"/> </joint> <link name="ptu_mount"> <inertial> <mass value="1"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/> <origin/> </inertial> <visual> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </visual> <collision> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </collision> </link> <joint name="tilt" type="continuous"> <origin xyz="0 0 .065"/> <axis xyz="0 -1 0"/> <parent link="ptu_piece"/> <child link="ptu_mount"/> </joint>

<joint name="top_ptu_joint" type="fixed">
    <origin xyz="-0.05 0.0 0.88" rpy="0 0.2 0"/>
    <parent link="top_plate"/>
    <child link="ptu_base"/>
</joint>

<link name="front_sonar"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/front_sonar.stl"/> </geometry> <material name="SonarYellow"> <color rgba="0.715 0.583 0.210 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_joint" type="fixed">
    <origin xyz="0.193 0 0.25" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="front_sonar"/>
</joint>

<link name="back_sonar">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
    <visual name="base_visual">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry name="pioneer_geom">
            <mesh filename="package://robina_description/meshes/p3at_meshes/back_sonar.stl"/>
        </geometry>
        <material name="SonarYellow">
            <color rgba="0.715 0.583 0.210 1.0"/>
        </material>
    </visual>
    <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <box size="0 0 0"/>
        </geometry>
    </collision>
</link>

<joint name="base_back_joint" type="fixed">
    <origin xyz="-0.187 0 0.247" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="back_sonar"/>
</joint>

<xacro:macro name="p3at_front" params="suffix reflect"> <link name="p3at_front_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_${suffix}_axle_joint" type="fixed">
    <origin xyz="0.135 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_front_${suffix}_axle"/>
</joint>

<link name="p3at_front_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow">
        <color rgba="1.0 0.811 0.151 1.0"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_hub_joint" type="fixed">
    <origin xyz="0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_axle"/>
    <child link="p3at_front_${suffix}_hub"/>
</joint>

<link name="p3at_front_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack">
        <color rgba="0.117 0.117 0.117 1"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_hub"/>
    <child link="p3at_front_${suffix}_wheel"/>
</joint>

<link name="p3at_back_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="bp3at_back_${suffix}_axle_joint" type="fixed">
    <origin xyz="-0.134 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_back_${suffix}_axle"/>
</joint>


<link name="p3at_back_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_hub_joint" type="fixed">
    <origin xyz="-0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_axle"/>
    <child link="p3at_back_${suffix}_hub"/>
</joint>

<link name="p3at_back_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_hub"/>
    <child link="p3at_back_${suffix}_wheel"/>
</joint>

</xacro:macro>

<xacro:p3at_front suffix="left" reflect="1"/> <xacro:p3at_front suffix="right" reflect="-1"/> <xacro:p3at_back suffix="left" reflect="1"/> <xacro:p3at_back suffix="right" reflect="-1"/>

<joint name="base_camera_joint" type="fixed"> <origin xyz="${robina_calib_cam_x} ${robina_calib_cam_y} ${robina_calib_cam_z}" rpy="${robina_calib_cam_rr} ${robina_calib_cam_rp} ${robina_calib_cam_ry}"/> <parent link="${robina_camera_parent_name}"/> <child link="camera_link"/> </joint>

<link name="camera_link"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial>

<visual>
  <origin xyz=" 0 0 0 " rpy="0 0 0" />
  <geometry>
    <mesh filename="package://robina_description/meshes/kinect.dae"/>
  </geometry>
</visual>

<collision>
  <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
  <geometry>
    <box size="0.0730 .2760 0.0720"/>
  </geometry>
</collision>

</link>

<joint name="camera_depth_joint" type="fixed"> <origin xyz="0 0.018 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_depth_frame"/> </joint>

<link name="camera_depth_frame"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial> </link>

<joint name="camera_depth_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_depth_frame"/> <child link="camera_depth_optical_frame"/> </joint>

<link name="camera_depth_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_joint" type="fixed"> <origin xyz="0 -0.005 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_rgb_frame"/> </joint>

<link name="camera_rgb_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_rgb_frame"/> <child link="camera_rgb_optical_frame"/> </joint>

<link name="camera_rgb_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

</robot>

here is my URDF:

<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="http://ros.org/wiki/xacro" name="pioneer3dx"> <property name="M_PI" value="3.14159"/>

<include filename="$(find robina_description)/urdf/gazebo.urdf.xacro"/> <include filename="$(find robina_description)/urdf/robina_calibration.xacro"/>

<link name="base_link"> <inertial> <mass value="3.5"/> <origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0.177" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/chassis.stl"/> </geometry> <material name="ChassisRed"> <color rgba="0.851 0.0 0.0 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.01 0.01 0.01"/> </geometry> </collision> </link>

<link name="top_plate"> <inertial> <mass value="0"/>
<origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/top.stl"/> </geometry> <material name="TopBlack"> <color rgba="0.038 0.038 0.038 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_top_joint" type="fixed">
    <origin xyz="0.003 0 0.41" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="top_plate"/>
</joint>


<link name="ptu_base">
 <inertial>
       <mass value="1"/>
       <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
        <origin xyz="0.003 0 0.274" rpy="0 0 0"/>
     </inertial>
     <visual>
       <origin xyz="0 0.015 0"/>
       <geometry>
         <box size="0.04 .07 .05"/>
       </geometry>
     </visual>
     <collision>
       <origin xyz="0 0.015 0"/>
     <geometry>
       <box size="0.04 .07 .05"/>
     </geometry>
     </collision>
     </link>
<link name="ptu_piece">
<inertial>
  <mass value="1"/>
  <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
  <origin/>
</inertial>
<visual>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
  <!--<material name="black"/>-->
</visual>
<collision>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
</collision>

</link> <joint name="pan" type="continuous"> <origin xyz="0 0 0"/> <axis xyz="0 0 1"/> <parent link="ptu_base"/> <child link="ptu_piece"/> </joint> <link name="ptu_mount"> <inertial> <mass value="1"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/> <origin/> </inertial> <visual> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </visual> <collision> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </collision> </link> <joint name="tilt" type="continuous"> <origin xyz="0 0 .065"/> <axis xyz="0 -1 0"/> <parent link="ptu_piece"/> <child link="ptu_mount"/> </joint>

<joint name="top_ptu_joint" type="fixed">
    <origin xyz="-0.05 0.0 0.88" rpy="0 0.2 0"/>
    <parent link="top_plate"/>
    <child link="ptu_base"/>
</joint>

<link name="front_sonar"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/front_sonar.stl"/> </geometry> <material name="SonarYellow"> <color rgba="0.715 0.583 0.210 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_joint" type="fixed">
    <origin xyz="0.193 0 0.25" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="front_sonar"/>
</joint>

<link name="back_sonar">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
    <visual name="base_visual">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry name="pioneer_geom">
            <mesh filename="package://robina_description/meshes/p3at_meshes/back_sonar.stl"/>
        </geometry>
        <material name="SonarYellow">
            <color rgba="0.715 0.583 0.210 1.0"/>
        </material>
    </visual>
    <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <box size="0 0 0"/>
        </geometry>
    </collision>
</link>

<joint name="base_back_joint" type="fixed">
    <origin xyz="-0.187 0 0.247" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="back_sonar"/>
</joint>

<xacro:macro name="p3at_front" params="suffix reflect"> <link name="p3at_front_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_${suffix}_axle_joint" type="fixed">
    <origin xyz="0.135 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_front_${suffix}_axle"/>
</joint>

<link name="p3at_front_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow">
        <color rgba="1.0 0.811 0.151 1.0"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_hub_joint" type="fixed">
    <origin xyz="0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_axle"/>
    <child link="p3at_front_${suffix}_hub"/>
</joint>

<link name="p3at_front_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack">
        <color rgba="0.117 0.117 0.117 1"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_hub"/>
    <child link="p3at_front_${suffix}_wheel"/>
</joint>

<link name="p3at_back_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="bp3at_back_${suffix}_axle_joint" type="fixed">
    <origin xyz="-0.134 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_back_${suffix}_axle"/>
</joint>


<link name="p3at_back_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_hub_joint" type="fixed">
    <origin xyz="-0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_axle"/>
    <child link="p3at_back_${suffix}_hub"/>
</joint>

<link name="p3at_back_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_hub"/>
    <child link="p3at_back_${suffix}_wheel"/>
</joint>

</xacro:macro>

<xacro:p3at_front suffix="left" reflect="1"/> <xacro:p3at_front suffix="right" reflect="-1"/> <xacro:p3at_back suffix="left" reflect="1"/> <xacro:p3at_back suffix="right" reflect="-1"/>

<joint name="base_camera_joint" type="fixed"> <origin xyz="${robina_calib_cam_x} ${robina_calib_cam_y} ${robina_calib_cam_z}" rpy="${robina_calib_cam_rr} ${robina_calib_cam_rp} ${robina_calib_cam_ry}"/> <parent link="${robina_camera_parent_name}"/> <child link="camera_link"/> </joint>

<link name="camera_link"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial>

<visual>
  <origin xyz=" 0 0 0 " rpy="0 0 0" />
  <geometry>
    <mesh filename="package://robina_description/meshes/kinect.dae"/>
  </geometry>
</visual>

<collision>
  <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
  <geometry>
    <box size="0.0730 .2760 0.0720"/>
  </geometry>
</collision>

</link>

<joint name="camera_depth_joint" type="fixed"> <origin xyz="0 0.018 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_depth_frame"/> </joint>

<link name="camera_depth_frame"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial> </link>

<joint name="camera_depth_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_depth_frame"/> <child link="camera_depth_optical_frame"/> </joint>

<link name="camera_depth_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_joint" type="fixed"> <origin xyz="0 -0.005 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_rgb_frame"/> </joint>

<link name="camera_rgb_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_rgb_frame"/> <child link="camera_rgb_optical_frame"/> </joint>

<link name="camera_rgb_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

</robot>

click to hide/show revision 3
moved to pastebin

here is my URDF:URDF: http://pastebin.com/RWeNLWDH

<robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="http://ros.org/wiki/xacro" name="pioneer3dx"> <property name="M_PI" value="3.14159"/>

<include filename="$(find robina_description)/urdf/gazebo.urdf.xacro"/> <include filename="$(find robina_description)/urdf/robina_calibration.xacro"/>

<link name="base_link"> <inertial> <mass value="3.5"/> <origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0.177" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/chassis.stl"/> </geometry> <material name="ChassisRed"> <color rgba="0.851 0.0 0.0 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0.01 0.01 0.01"/> </geometry> </collision> </link>

<link name="top_plate"> <inertial> <mass value="0"/>
<origin xyz="-0.025 0 -0.223"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/top.stl"/> </geometry> <material name="TopBlack"> <color rgba="0.038 0.038 0.038 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_top_joint" type="fixed">
    <origin xyz="0.003 0 0.41" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="top_plate"/>
</joint>


<link name="ptu_base">
 <inertial>
       <mass value="1"/>
       <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
        <origin xyz="0.003 0 0.274" rpy="0 0 0"/>
     </inertial>
     <visual>
       <origin xyz="0 0.015 0"/>
       <geometry>
         <box size="0.04 .07 .05"/>
       </geometry>
     </visual>
     <collision>
       <origin xyz="0 0.015 0"/>
     <geometry>
       <box size="0.04 .07 .05"/>
     </geometry>
     </collision>
     </link>
<link name="ptu_piece">
<inertial>
  <mass value="1"/>
  <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/>
  <origin/>
</inertial>
<visual>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
  <!--<material name="black"/>-->
</visual>
<collision>
  <origin/>
  <geometry>
    <box size="0.04 .04 .06"/>
  </geometry>
</collision>

</link> <joint name="pan" type="continuous"> <origin xyz="0 0 0"/> <axis xyz="0 0 1"/> <parent link="ptu_base"/> <child link="ptu_piece"/> </joint> <link name="ptu_mount"> <inertial> <mass value="1"/> <inertia ixx="100" ixy="0" ixz="0" iyy="100" iyz="0" izz="100"/> <origin/> </inertial> <visual> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </visual> <collision> <origin/> <geometry> <box size="0.04 .27 .03"/> </geometry> </collision> </link> <joint name="tilt" type="continuous"> <origin xyz="0 0 .065"/> <axis xyz="0 -1 0"/> <parent link="ptu_piece"/> <child link="ptu_mount"/> </joint>

<joint name="top_ptu_joint" type="fixed">
    <origin xyz="-0.05 0.0 0.88" rpy="0 0.2 0"/>
    <parent link="top_plate"/>
    <child link="ptu_base"/>
</joint>

<link name="front_sonar"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/front_sonar.stl"/> </geometry> <material name="SonarYellow"> <color rgba="0.715 0.583 0.210 1.0"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_joint" type="fixed">
    <origin xyz="0.193 0 0.25" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="front_sonar"/>
</joint>

<link name="back_sonar">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
    <visual name="base_visual">
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry name="pioneer_geom">
            <mesh filename="package://robina_description/meshes/p3at_meshes/back_sonar.stl"/>
        </geometry>
        <material name="SonarYellow">
            <color rgba="0.715 0.583 0.210 1.0"/>
        </material>
    </visual>
    <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
            <box size="0 0 0"/>
        </geometry>
    </collision>
</link>

<joint name="base_back_joint" type="fixed">
    <origin xyz="-0.187 0 0.247" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="back_sonar"/>
</joint>

<xacro:macro name="p3at_front" params="suffix reflect"> <link name="p3at_front_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="base_front_${suffix}_axle_joint" type="fixed">
    <origin xyz="0.135 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_front_${suffix}_axle"/>
</joint>

<link name="p3at_front_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow">
        <color rgba="1.0 0.811 0.151 1.0"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_hub_joint" type="fixed">
    <origin xyz="0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_axle"/>
    <child link="p3at_front_${suffix}_hub"/>
</joint>

<link name="p3at_front_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack">
        <color rgba="0.117 0.117 0.117 1"/>
    </material>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="base_front_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_front_${suffix}_hub"/>
    <child link="p3at_front_${suffix}_wheel"/>
</joint>

<link name="p3at_back_${suffix}_axle"> <inertial> <mass value="0"/>
<origin xyz="0 0 0"/> <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> </inertial> <visual name="base_visual"> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry name="pioneer_geom"> <mesh filename="package://robina_description/meshes/p3at_meshes/axle.stl"/> </geometry> <material name="AxleGrey"> <color rgba="0.5 0.5 0.5 1"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <box size="0 0 0"/> </geometry> </collision> </link>

<joint name="bp3at_back_${suffix}_axle_joint" type="fixed">
    <origin xyz="-0.134 ${reflect*0.156} 0.111" rpy="0 0 0"/>
    <parent link="base_link"/>
    <child link="p3at_back_${suffix}_axle"/>
</joint>


<link name="p3at_back_${suffix}_hub">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/${suffix}_hubcap.stl"/>
    </geometry>
    <material name="HubcapYellow"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_hub_joint" type="fixed">
    <origin xyz="-0 ${reflect*0.041} 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_axle"/>
    <child link="p3at_back_${suffix}_hub"/>
</joint>

<link name="p3at_back_${suffix}_wheel">
    <inertial>
        <mass value="0"/>   
        <origin xyz="0 0 0"/>
        <inertia ixx="1" ixy="0" ixz="0"
             iyy="1" iyz="0" izz="1"/>
    </inertial>
<visual name="base_visual">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry name="pioneer_geom">
        <mesh filename="package://robina_description/meshes/p3at_meshes/wheel.stl"/>
    </geometry>
    <material name="WheelBlack"/>
</visual>
<collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
        <box size="0 0 0"/>
    </geometry>
</collision>
</link>

<joint name="p3at_back_${suffix}_wheel_joint" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <parent link="p3at_back_${suffix}_hub"/>
    <child link="p3at_back_${suffix}_wheel"/>
</joint>

</xacro:macro>

<xacro:p3at_front suffix="left" reflect="1"/> <xacro:p3at_front suffix="right" reflect="-1"/> <xacro:p3at_back suffix="left" reflect="1"/> <xacro:p3at_back suffix="right" reflect="-1"/>

<joint name="base_camera_joint" type="fixed"> <origin xyz="${robina_calib_cam_x} ${robina_calib_cam_y} ${robina_calib_cam_z}" rpy="${robina_calib_cam_rr} ${robina_calib_cam_rp} ${robina_calib_cam_ry}"/> <parent link="${robina_camera_parent_name}"/> <child link="camera_link"/> </joint>

<link name="camera_link"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial>

<visual>
  <origin xyz=" 0 0 0 " rpy="0 0 0" />
  <geometry>
    <mesh filename="package://robina_description/meshes/kinect.dae"/>
  </geometry>
</visual>

<collision>
  <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
  <geometry>
    <box size="0.0730 .2760 0.0720"/>
  </geometry>
</collision>

</link>

<joint name="camera_depth_joint" type="fixed"> <origin xyz="0 0.018 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_depth_frame"/> </joint>

<link name="camera_depth_frame"> <inertial> <mass value="0.01"/> <origin xyz="0 0 0"/> <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/> </inertial> </link>

<joint name="camera_depth_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_depth_frame"/> <child link="camera_depth_optical_frame"/> </joint>

<link name="camera_depth_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_joint" type="fixed"> <origin xyz="0 -0.005 0" rpy="0 0 0"/> <parent link="camera_link"/> <child link="camera_rgb_frame"/> </joint>

<link name="camera_rgb_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

<joint name="camera_rgb_optical_joint" type="fixed"> <origin xyz="0 0 0" rpy="${-M_PI/2} 0 ${-M_PI/2}"/> <parent link="camera_rgb_frame"/> <child link="camera_rgb_optical_frame"/> </joint>

<link name="camera_rgb_optical_frame"> <inertial> <mass value="0.001"/> <origin xyz="0 0 0"/> <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/> </inertial> </link>

</robot>