Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to Calculate pose of a component quickly

asked 2014-07-03 07:24:42 -0500

RoboTN gravatar image

Dear all,

I'm newbie in gazebo simulator. I'm little confused how to fill the exact value for < pose > tag of link. Is there any simple way to do it? I looked for pose calculation around but no deep answer.

Please help me. Thanks so much.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2014-07-03 11:31:11 -0500

nkoenig gravatar image

Ahh, the current method to calculate the pose of each link is cumbersome. The pose of each model is in the global frame, and the pose of each link is in the model frame. You currently have to calculate the poses by hand.

Here is an issue to make pose calculations a bit easier.

edit flag offensive delete link more

Comments

Thanks so much for your answer!

RoboTN gravatar imageRoboTN ( 2014-07-03 20:49:50 -0500 )edit
0

answered 2014-07-03 09:08:32 -0500

RoboTN gravatar image

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 ...
(more)
edit flag offensive delete link more
0

answered 2014-07-03 08:35:40 -0500

nkoenig gravatar image

The <pose> tag is a space separated 6-tuple: x y z roll pitch yaw.

For example, a pose of x=1 y=2 z=3 roll=0 pitch=45degrees and yaw=90degrees:

<pose>1 2 3 0 0.785 1.571</pose>

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-07-03 07:24:42 -0500

Seen: 1,409 times

Last updated: Jul 03 '14