# How to Calculate pose of a component quickly

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.

edit retag close merge delete

Sort by » oldest newest most voted

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.

more

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>

more

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'>
<static>false</static>

<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>

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

<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>

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

<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>

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

<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>

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

<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>

<pose>0.5 0.13 0.15 0 0 0</pose>
<collision name='collision'>
<geometry>
<cylinder>
<length>0.3</length>
</cylinder>
</geometry>
</collision>
<visual name='visual'>
<geometry>
<cylinder>
<length>0.3</length>
</cylinder>
</geometry>
</visual>
<joint ...