fixed tendon with two hinge joints, cannot move forward

Discussion in 'Modeling' started by lin, Jun 28, 2018.

  1. lin

    lin

    I use two ellipsoids to simulate two wheels, each of which has a hinge joint. And I use a fixed tendon to combine two hinge joints, and attach a motor to that tendon. But when I apply a torque, the two wheels just rotate without moving forward.

    Does anyone know how to fix this? The following is the xml file I use:

    <mujoco model="test">
    <compiler angle="radian" coordinate="local" inertiafromgeom="true"/>
    <option timestep="0.01"/>
    <default>
    <joint armature="0" damping="0" limited="false"/>
    <geom friction="1 0.1 0.1" rgba="0.8 0.6 0.4 1" />
    <motor gear="1"/>
    </default>

    <asset>
    <texture builtin="gradient" height="100" rgb1="1 1 1" rgb2="0 0 0" type="skybox" width="100"/>
    <texture builtin="flat" height="1278" mark="cross" markrgb="1 1 1" name="texgeom" random="0.01" rgb1="0.8 0.6 0.4" rgb2="0.8 0.6 0.4" type="cube" width="127"/>
    <texture builtin="checker" height="100" name="texplane" rgb1="0 0 0" rgb2="0.8 0.8 0.8" type="2d" width="100"/>
    <material name="MatPlane" reflectance="0.5" shininess="1" specular="1" texrepeat="60 60" texture="texplane"/>
    <material name="geom" texture="texgeom" texuniform="true"/>
    </asset>

    <worldbody>
    <light cutoff="100" diffuse="1 1 1" dir="-0 0 -1.3" directional="true" exponent="1" pos="0 0 1.3" specular=".1 .1 .1"/>
    <geom material="MatPlane" name="floor" pos="0 0 0" rgba="0.8 0.9 0.8 1" size="20 20 0.1" type="plane"/>

    <body name="base_link" pos="0 0 0">
    <geom name="center" size="0.02" pos="0 0 0.1" type="sphere" rgba="1 0 0 1"/>
    <body name="leftw" pos="0.0 0.21 0.1" quat="0.707141 0.707073 0 0">
    <joint pos="0 -0.1 0" type="slide" axis="1 0 0"/>
    <joint name="base_link_JOINT_0" pos="0 0 0" axis="0 0 -1" />
    <geom name="leftw" size="0.1 0.1 0.07" type="ellipsoid"/>
    </body>
    <body name="rightw" pos="0.0 -0.21 0.1" quat="0.707141 0.707073 0 0">
    <joint pos="0 -0.1 0" type="slide" axis="1 0 0"/>
    <joint name="base_link_JOINT_1" pos="0 0 0" axis="0 0 -1" />
    <geom name="rightw" size="0.1 0.1 0.07" type="ellipsoid"/>
    </body>
    </body>
    </worldbody>

    <tendon>
    <fixed name="roll">
    <joint joint="base_link_JOINT_0" coef="0.5"/>
    <joint joint="base_link_JOINT_1" coef="0.5"/>
    </fixed>
    </tendon>

    <actuator>
    <motor tendon="roll" ctrlrange="-1.0 1.0" ctrllimited="true"/>
    </actuator>

    </mujoco>