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

URDF model

asked 2012-10-20 22:59:07 -0500

Nachum gravatar image

updated 2012-10-22 04:08:38 -0500

Hi I'm trying to build a urdf model of 2 legs attached with a joint (biped). the problem i am having is that the piece that attaches the two legs doesn't seem to be attached to them. here is the urdf and hereimage description is a picture of the problem

edit1: changed my urdf. now it doesn't jitter but nothing moves when I try controlling the joints in gazebo. i even deleted one foot and the model didn't fall over. any idea what is wrong?

 <?xml version="1.0" ?>
<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://playerstage.sourceforge.net/gazebo/xmlschema/#interface" name=
   "bip">





  <link name="R_leg">
   <inertial>
     <mass value="0.001"/>
       <origin xyz="0 0 0.5" rpy="0 0 0" />

     <inertia ixx="1.00"  ixy="0"  ixz="0" iyy="1.00" iyz="0"    izz="1.00" />
     </inertial>



   <visual>
     <origin xyz="0 0.2 0.5" rpy="0 0 0" />
     <geometry>
      <cylinder radius="0.02" length="1"/>
     </geometry>
   </visual>

   <collision>
     <origin xyz="0 0.2 0.5" rpy="0 0 0"/>
     <geometry>
       <cylinder radius="0.02" length="1"/>
     </geometry>
   </collision>

  </link>

  <link name="L_leg">
    <inertial>
     <mass value="0.001"/>
       <origin xyz="0 0 0.5" rpy="0 0 0" />

     <inertia ixx="1.00"  ixy="0"  ixz="0" iyy="1.00" iyz="0"    izz="1.00" />
     </inertial>



   <visual>
     <origin xyz="0 -0.20 0.5" rpy="0 0 0" />
     <geometry>
      <cylinder radius="0.02" length="1"/>
     </geometry>
   </visual>

   <collision>
     <origin xyz="0 -0.20 0.5" rpy="0 0 0"/>
     <geometry>
       <cylinder radius="0.02" length="1"/>
     </geometry>
   </collision>

  </link>
   <link name="C_mass"> 
    <inertial>
      <mass value="15.0" />
      <origin xyz="0 0.0 0" /> 
      <inertia  ixx="0.1" ixy="0.0"  ixz="0.0"  iyy="10"  iyz="0.0"  izz="0.1" />
    </inertial>

    <visual>
      <origin xyz="0 0 1" rpy="1.57 0 0" />
      <geometry>
        <cylinder radius="0.02" length="0.5"/>
      </geometry>
    </visual>

    <collision>
      <origin xyz="0 0 1" rpy="1.57 0 0" />
      <geometry>
         <cylinder radius="0.02" length="0.38"/>
      </geometry>
    </collision>


   </link>



   <link name="R_foot"> 

    <inertial>
      <mass value="1.0" />
      <!-- center of mass (com) is defined w.r.t. link local   coordinate system -->
      <origin xyz="0 0 0" /> 
      <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="1.0"  iyz="0.0"  izz="1.0" />
    </inertial>

    <visual>
      <origin xyz="0 0.2 0.0005" rpy="0 0 0" />
      <geometry>
        <box size="0.1 0.1 0.001"/>
      </geometry>
    </visual>


    <collision>
      <origin xyz="0 0.2 0.0005" rpy="0 0 0" />
      <geometry>
        <box size="0.1 0.1 0.001"/>
      </geometry>
    </collision>
   </link>

  <link name="L_foot"> 

    <inertial>
      <mass value="1.0" />
      <!-- center of mass (com) is defined w.r.t. link local   coordinate system -->
      <origin xyz="0 0 0" /> 
      <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="1.0"  iyz="0.0"  izz="1 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-10-21 06:46:13 -0500

hsu gravatar image

Running check_urdf (or rename your urdf to something.xml and open it with firefox) you'll see that there is an error with the < limit tag in the R_hip link:

rosrun urdf check_urdf answers-46376.urdf 
[ERROR] [1350837640.291120602]: Joint 'R_hip' is of type REVOLUTE but it does not specify limits
[ERROR] [1350837640.291120602]: joint xml is not initialized correctly
ERROR: Model Parsing the xml failed

fixing the malformed XML in the "R_hip" link by removing the space before limit:

     <limit upper="6.28" lower="-6.28" effort="1000" velocity="1000.00"/>

appears to fix the problem.

edit flag offensive delete link more

Comments

thanks. the space i already noticed and fixed. I would have thought that the model would fall to one side but it went crazy and broke to pieces. I did PD control on all the joints. it is better but still jittering some.

Nachum gravatar image Nachum  ( 2012-10-21 07:45:15 -0500 )edit

zero inertia's move infinitely fast with any finite force application :)

hsu gravatar image hsu  ( 2012-10-21 07:56:31 -0500 )edit

:) it looks likethat is part of the problem, but if yes two things are weird.the first that PD does control it it shouldn't if it is infinit, and secind why isn't it rotating around the upper joint? i will check it tomorrow when i will get to work

Nachum gravatar image Nachum  ( 2012-10-21 08:50:13 -0500 )edit
4

answered 2012-10-21 06:17:45 -0500

David Lu gravatar image

You need to specify the origin of the joint to be in the proper place relative to the parent link. For a rundown of how the origin tags work, check out this geeky guy's presentation on URDF (specifically the portion I linked to).

It may also help to use the joint_state_publisher and rviz to debug your model (as in the URDF tutorials. Using that approach is how I noticed that your legs did not rotate as I would expect them to.

edit flag offensive delete link more

Comments

Thanks for the video. Great to see the face behind the name :)

Nachum gravatar image Nachum  ( 2012-10-21 08:52:23 -0500 )edit

i did change it to the place it should be in real world. still is braking as i wrote on the second answer/

Nachum gravatar image Nachum  ( 2012-10-21 08:54:24 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-10-20 22:59:07 -0500

Seen: 3,120 times

Last updated: Oct 22 '12