Adding actuators for composite object

Discussion in 'Modeling' started by Xingyu Lin, Nov 20, 2018.

  1. Is there an example on how to add actuators for composite objects? I do not want to add an actuator for each of the element, as there can be many. Here is an example of the composite object I am working with:

    <worldbody>

    <body name="B15" pos="-0.15 0 0.92">
    <freejoint name="J_ref"/>
    <composite type="rope" count="31 1 1" spacing="0.04" offset="0 0 2">
    <joint kind="main" damping="0.005"/>
    <geom type="capsule" size=".01 .015" rgba=".8 .2 .1 1"/>
    </composite>
    </body>

    </worldbody>
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The names of the joints in the composite body are generated automatically. You can see them in the visualizer (toggle Label Body in the Render options). Once you know the joint names, you can add actuators to them in the XML. The <composite> element is expanded in a pre-processing stage, so it is OK to reference the automatically-generated element names in the rest of the model.
     
    Xingyu Lin likes this.
  3. Thanks! We end up writing a script for generating new actuators.