Robotics StackExchange | Archived questions

How is the joints pose determined?

I'm following the make a mobile robot tutorial and I don't understand how the pose is determined for the wheel joints. When the wheels are created, the poses are offset in y to account for the body but the joints for the wheels are offset in z. This doesn't make any sense to me.

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

        <pose>0 0 0.1 0 0 0</pose>
        <collision name="chassis_collision">
            <geometry>
                <box>
                    <size>0.4 0.2 0.1</size>
                </box>
            </geometry>
        </collision>

        <visual name='chassis_visual'>
            <pose>0 0 0.05 0 0 0</pose>
            <geometry>
                <mesh>
                    <uri>model://pioneer2dx/meshes/chassis.dae</uri>
                    <scale>0.9 0.5 0.5</scale>
                </mesh>
            </geometry>
        </visual>

        <collision name='caster_collision'>
            <pose>-0.15 0 -0.05 0 0 0</pose>
            <geometry>
                <sphere>
                    <radius>0.05</radius>
                </sphere>
            </geometry>

            <surface>
                <friction>
                    <ode>
                        <mu>0</mu>
                        <mu2>0</mu2>
                        <slip1>1.0</slip1>
                        <slip2>1.0</slip2>
                    </ode>
                </friction>
            </surface>
        </collision>

        <visual name='caster_visual'>
            <pose>-0.15 0 -0.05 0 0 0</pose>
            <geometry>
                <sphere>
                    <radius>0.05</radius>
                </sphere>
            </geometry>
        </visual>
    </link>

    <link name='left_wheel'>
        <pose>0.1 0.13 0.1 0 1.5707 1.5707</pose>
        <collision name='left_wheel_collision'>
            <geometry>
                <cylinder>
                    <radius>0.1</radius>
                    <length>0.05</length>
                </cylinder>
            </geometry>
        </collision>

        <visual name='left_wheel_visual'>
            <geometry>
                <cylinder>
                    <radius>0.1</radius>
                    <length>0.05</length>
                </cylinder>
            </geometry>
        </visual>
    </link>
    <link name='right_wheel'>
        <pose>0.1 -0.13 0.1 0 1.5707 1.5707</pose>
        <collision name='right_wheel_collision'>
            <geometry>
                <cylinder>
                    <radius>0.1</radius>
                    <length>0.05</length>
                </cylinder>
            </geometry>
        </collision>

        <visual name='right_wheel_visual'>
            <geometry>
                <cylinder>
                    <radius>0.1</radius>
                    <length>0.05</length>
                </cylinder>
            </geometry>
        </visual>
    </link>
    <joint type="revolute" name="left_wheel_hinge">
        <pose> 0 0 -0.03 0 0 0</pose>
        <child>left_wheel</child>
        <parent>chassis</parent>
        <axis>
            <xyz>0 1 0</xyz>
        </axis>
    </joint>

    <joint type="revolute" name="right_wheel_hinge">
        <pose> 0 0 0.03 0 0 0</pose>
        <child>right_wheel</child>
        <parent>chassis</parent>
        <axis>
            <xyz>0 1 0</xyz>
        </axis>
    </joint>
 </model>
</sdf>

Asked by jhlawley on 2019-12-17 10:25:45 UTC

Comments

Answers