Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to stop joint pose from being completely ignored by Gazebo

asked 2015-04-11 13:49:56 -0500

Cerin gravatar image

What are the rules by which Gazebo interprets joint poses? They seem completely different from links.

I have a two simple "bars", representing parts of a leg, each rotated by 45 degrees to form a "knee" at their intersection:

<link name="upper">
    <pose>-.01 .035 .1 0 0 0.785398</pose>
    <inertial>
        <pose>0 0 -0.5 0 0 0</pose>
        <inertia>
            <ixx>0.01</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.01</iyy>
            <iyz>0</iyz>
            <izz>0.01</izz>
        </inertia>
        <mass>10.0</mass>
    </inertial>
    <collision name="collision">
        <geometry>
            <box>
                <size>0.04 0.005 0.003</size>
            </box>
        </geometry>
    </collision>
    <visual name="visual">
        <geometry>
            <box>
                <size>0.04 0.005 0.003</size>
            </box>
        </geometry>
        <material>
            <script>Gazebo/Purple</script>
        </material>
    </visual>
</link>
<link name="middle">
    <pose>0 0 .097 0 0 -0.785398</pose>
    <inertial>
        <pose>0 0 -0.5 0 0 0</pose>
        <inertia>
            <ixx>0.01</ixx>
            <ixy>0</ixy>
            <ixz>0</ixz>
            <iyy>0.01</iyy>
            <iyz>0</iyz>
            <izz>0.01</izz>
        </inertia>
        <mass>10.0</mass>
    </inertial>
    <collision name="collision">
        <geometry>
            <box>
                <size>0.07 0.005 0.003</size>
            </box>
        </geometry>
    </collision>
    <visual name="visual">
        <geometry>
            <box>
                <size>0.07 0.005 0.003</size>
            </box>
        </geometry>
        <material>
            <script>Gazebo/Blue</script>
        </material>
    </visual>
</link>

I want to attach a revolute joint at the intersection, representing the knee joint. So I thought the joint's pose would be identical to the point at the end of the bar. This point is calculated as the half the length of the bar, minus an inset, rotated about the origin by 45 degrees, which is the x/y coordinate of (-0.0229809703886, 0.0229809703886).

This gives me a joint with a pose like:

<joint name="upper_middle_joint" type="revolute">
    <pose>-0.0229809703886 0.0229809703886 0 0 0 0</pose>
    <child>middle</child>
    <parent>upper</parent>
    <axis>
        <limit>
            <lower>-0.4</lower>
            <upper>0.4</upper>
        </limit>
        <xyz>0 0 1</xyz>
    </axis>
</joint>

However, when I view this in Gazebo, it looks like:

![joint misalignment](http://i.imgur.com/rwkXhUz.png)

Instead of posing the joint up along the y-axis by 0.023 and over along the negative x-axis by 0.023, it appears to have moved the joint up along the y-axis by 0.04 and nothing along the x-axis.

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-04-11 14:00:20 -0500

According to the SDF specification, the joint pose is the "Pose offset from child link frame to joint frame (expressed in child link frame)".

Note that the axis of rotation can be expressed in the joint frame or the parent model frame, using the <use_parent_model_frame> tag.

edit flag offensive delete link more

Comments

Ah, that makes sense. My "middle" link is rotated by 45 degrees, and the joint automatically is as well, so I didn't need to add any additional rotation. However, how is that use_parent_model_frame tag used? Those docs don't say, and specifying true or false for it doesn't seem to have any effect.

Cerin gravatar imageCerin ( 2015-04-11 16:54:07 -0500 )edit
1

use_parent_model_frame only changes the frame used to interpret the axis xyz tag, not the joint pose tag. It's really there for backwards compatibility (see gazebo issue 494 for historical reference).

scpeters gravatar imagescpeters ( 2015-04-12 00:39:29 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-04-11 13:49:56 -0500

Seen: 980 times

Last updated: Apr 11 '15