Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Thanks for quick answer. I knew this definition. but what i'm still unclear is that when the model contains several links, joints, how can calculate the exact pose of each link and joint. Is there any way to calculate these poses? I see that if the model is more complicated, the pose calculation would be a big deal. This is the model i made and it fails to stand.

<?xml version='1.0'?>
<sdf version='1.4'>
  <model name="quadrobot">
  <static>false</static>

   <link name='frontbody'>
<pose>0 0 0.3 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <box>
   <size>0.4 0.2 0.1</size>
  </box>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <box>
   <size>0.4 0.2 0.1</size>
  </box>
 </geometry>
</visual>
   </link>

   <link name='frontspine'>
<pose>0.225 0 0.3 0 1.5707 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.005</radius>
   <length>0.05</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.005</radius>
   <length>0.05</length>
  </cylinder>
 </geometry>
</visual>
   </link>

   <link name='backbody'>
<pose>0.5 0 0.3 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <box>
   <size>0.4 0.2 0.1</size>
  </box>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <box>
   <size>0.4 0.2 0.1</size>
  </box>
 </geometry>
</visual>
   </link>

   <link name='backspine'>
<pose>0.275 0 0.3 0 1.5707 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.005</radius>
   <length>0.05</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.005</radius>
   <length>0.05</length>
  </cylinder>
 </geometry>
</visual>
   </link>  

   <joint type='relovute' name='spinejoint'>
    <pose>0.45 0 0.3 0 0 0</pose>
<child>frontspine</child>
<parent>backspine</parent>
<axis>
 <xyz>0 1 0</xyz>
</axis>
   </joint>

   <link name='FRleg'>
<pose>-0.0 -0.13 0.12 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</visual>

   </link>  

   <joint type='relovute' name='FRLegjoint'>
    <pose>0.0 -0.1 0.3 0 0 0</pose>
<child>FRleg</child>
<parent>frontbody</parent>
<axis>
 <xyz>0 1 0</xyz>
</axis>
   </joint>

   <link name='FLleg'>
<pose>-0.0 0.13 0.15 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</visual>
   </link>  

   <joint type='relovute' name='FRLegjoint'>
    <pose>0.0 0.1 0.3 0 0 0</pose>
<child>FLleg</child>
<parent>frontbody</parent>
<axis>
 <xyz>0 1 0</xyz>
</axis>
   </joint>

   <link name='HLleg'>
<pose>0.5 0.13 0.15 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</visual>
   </link>  

   <joint type='relovute' name='HLLegjoint'>
    <pose>0.5 0.1 0.0 0 0 0</pose>
<child>HLleg</child>
<parent>backbody</parent>
<axis>
 <xyz>0 1 0</xyz>
</axis>
   </joint>

   <link name='HRleg'>
<pose>0.5 -0.13 0.15 0 0 0</pose>
<collision name='collision'>     
<geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</collision>
<visual name='visual'>
 <geometry>
  <cylinder>
   <radius>0.03</radius>
   <length>0.3</length>
  </cylinder>
 </geometry>
</visual>
   </link>  

   <joint type='relovute' name='HRLegjoint'>
    <pose>0.5 -0.1 0.0 0 0 0</pose>
<child>HRleg</child>
<parent>backbody</parent>
<axis>
 <xyz>0 1 0</xyz>
</axis>
   </joint>

  </model>
</sdf>