Quantcast

Problem loading urdf into gazebo

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem loading urdf into gazebo

Tyler-4
Hello,

I'm having trouble loading my urdf into gazebo for simulation.  The urdf parses sucsessfully with both check_urdf and kdl_parser.  When I load into gazebo I'm getting an error that reads

Error Loading Joint[r_shoulder_rz_joint]
/home/tyler/ros/pkgs/simulator_gazebo/gazebo/gazebo-svn/server/physics/Joint.cc:136 : Exception: Couldn't Find Body[r_shoulder_rx_link

This happens if I load from the parameter server or directly from the urdf.  I've tried reordering the urdf to more closely match the example in the tutorial, but that hasn't worked.  I've also tried offsetting the rx and rz joints slightly so that the links don't have 0 length.

I've also noticed that the colors aren't loading into gazebo, and gazebo will fail to load links if inertia and visual tags aren't defined (even though they are labeled as optional in the wiki).

Here is the relevant parts of my urdf

     <link name="body_link" >
          <inertial>
               <origin xyz="0 0 0.117" rpy="0 0 0"/>
               <mass value="2.604"/>
               <inertia ixx="0.005605" iyy="0.004139" izz="0.003809" ixy="0" ixz="0" iyz="0" />
          </inertial>
          <visual>
               <origin xyz="0 0 0.128" rpy="0 0 0" />
               <geometry>
                    <box size="0.0905 0.136 0.156" />
                    </geometry>
              <material name="Green">
                   <color rgba="0.0 0.8 0.0 1.0"/>
                   </material>
               </visual>
          <collision>
               <origin xyz="0 0 0.128" rpy="0 0 0" />
               <geometry>
                    <box size="0.0905 0.136 0.156" />
                    </geometry>
               <contact_coefficients mu="1" kp="1.0" kd="1.0"/>      
          </collision>       
          </link>

     <joint name="r_shoulder_ry_joint" type="continuous">
          <parent link="body_link"/>
          <child link="r_shoulder_ry_link"/>
          <origin xyz="0 -0.068 0.176" rpy="0 0 0" />
          <axis xyz="0 1 0" />
          </joint>

     <link name="r_shoulder_ry_link" >
          <visual>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <geometry>
                    <sphere radius="0.005" />
                    </geometry>
               </visual>
          <inertial>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <mass value="0.001"/>
               <inertia ixx="0.000001" iyy="0.000001" izz="0.000001" ixy="0" ixz="0" iyz="0" />
               </inertial>
          </link>

     <joint name="r_shoulder_rx_joint" type="continuous">
          <parent link="r_shoulder_ry_link"/>
          <child link="r_shoulder_rx_link"/>
          <origin xyz="0 0 0" rpy="0 0 0" />
          <axis xyz="1 0 0" />
          </joint>

     <link name="r_shoulder_rx_link">
          <visual>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <geometry>
                    <sphere radius="0.005" />
                    </geometry>
               </visual>
          <inertial>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <mass value="0.001"/>
               <inertia ixx="0.000001" iyy="0.000001" izz="0.000001" ixy="0" ixz="0" iyz="0" />
               </inertial>
          </link>

     <joint name="r_shoulder_rz_joint" type="continuous">
          <parent link="r_shoulder_rx_link"/>
          <child link="r_upr_arm_link"/>
          <origin xyz="0 0 0" rpy="0 0 0" />
          <axis xyz="0 0 1" />
          </joint>

I'm new to this so I apologize if I'm not providing enough information or if there's a really simple answer.  However, I've spend two days trying to figure this out now without success.

Thanks,
Tyler

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
ros-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ros-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ros-users] Problem loading urdf into gazebo

John Hsu
Hi Tyler,

yes, gazebo requires inertial, visual and collision elements in a link to simulate it.  It's decalred "optional" urdf syntax wise, but is required for simulation.  So in this case r_shoulder_rx_link has no collision, and thus the link is not simulated.
As for color, you have to specify material in the extension, e.g.
<gazebo reference="r_shoulder_rx_link">
  <material value value="Gazebo/Red"/>
</gazebo>
where "Gazebo/Red" has to be specified in an ogre script such as
gazebo/gazebo/share/gazebo/Media/materials/scripts/Gazebo.material

The <material><color rgba=".5 .5 .5 .5"/></material> tag you see in urdf is currently only used by rviz.

hope this helps.
John

On Wed, Jan 20, 2010 at 8:18 PM, Tyler <[hidden email]> wrote:
Hello,

I'm having trouble loading my urdf into gazebo for simulation.  The urdf parses sucsessfully with both check_urdf and kdl_parser.  When I load into gazebo I'm getting an error that reads

Error Loading Joint[r_shoulder_rz_joint]
/home/tyler/ros/pkgs/simulator_gazebo/gazebo/gazebo-svn/server/physics/Joint.cc:136 : Exception: Couldn't Find Body[r_shoulder_rx_link

This happens if I load from the parameter server or directly from the urdf.  I've tried reordering the urdf to more closely match the example in the tutorial, but that hasn't worked.  I've also tried offsetting the rx and rz joints slightly so that the links don't have 0 length.

I've also noticed that the colors aren't loading into gazebo, and gazebo will fail to load links if inertia and visual tags aren't defined (even though they are labeled as optional in the wiki).

Here is the relevant parts of my urdf

     <link name="body_link" >
          <inertial>
               <origin xyz="0 0 0.117" rpy="0 0 0"/>
               <mass value="2.604"/>
               <inertia ixx="0.005605" iyy="0.004139" izz="0.003809" ixy="0" ixz="0" iyz="0" />
          </inertial>
          <visual>
               <origin xyz="0 0 0.128" rpy="0 0 0" />
               <geometry>
                    <box size="0.0905 0.136 0.156" />
                    </geometry>
              <material name="Green">
                   <color rgba="0.0 0.8 0.0 1.0"/>
                   </material>
               </visual>
          <collision>
               <origin xyz="0 0 0.128" rpy="0 0 0" />
               <geometry>
                    <box size="0.0905 0.136 0.156" />
                    </geometry>
               <contact_coefficients mu="1" kp="1.0" kd="1.0"/>      
          </collision>       
          </link>

     <joint name="r_shoulder_ry_joint" type="continuous">
          <parent link="body_link"/>
          <child link="r_shoulder_ry_link"/>
          <origin xyz="0 -0.068 0.176" rpy="0 0 0" />
          <axis xyz="0 1 0" />
          </joint>

     <link name="r_shoulder_ry_link" >
          <visual>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <geometry>
                    <sphere radius="0.005" />
                    </geometry>
               </visual>
          <inertial>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <mass value="0.001"/>
               <inertia ixx="0.000001" iyy="0.000001" izz="0.000001" ixy="0" ixz="0" iyz="0" />
               </inertial>
          </link>

     <joint name="r_shoulder_rx_joint" type="continuous">
          <parent link="r_shoulder_ry_link"/>
          <child link="r_shoulder_rx_link"/>
          <origin xyz="0 0 0" rpy="0 0 0" />
          <axis xyz="1 0 0" />
          </joint>

     <link name="r_shoulder_rx_link">
          <visual>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <geometry>
                    <sphere radius="0.005" />
                    </geometry>
               </visual>
          <inertial>
               <origin xyz="0 0 0" rpy="0 0 0"/>
               <mass value="0.001"/>
               <inertia ixx="0.000001" iyy="0.000001" izz="0.000001" ixy="0" ixz="0" iyz="0" />
               </inertial>
          </link>

     <joint name="r_shoulder_rz_joint" type="continuous">
          <parent link="r_shoulder_rx_link"/>
          <child link="r_upr_arm_link"/>
          <origin xyz="0 0 0" rpy="0 0 0" />
          <axis xyz="0 0 1" />
          </joint>

I'm new to this so I apologize if I'm not providing enough information or if there's a really simple answer.  However, I've spend two days trying to figure this out now without success.

Thanks,
Tyler

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
ros-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ros-users



------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
ros-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ros-users
Loading...