Adding multiple composite objects throws repeated name error

Discussion in 'Modeling' started by Harjatin Baweja, Oct 22, 2018.

  1. I want to add multiple composite objects in an environment at once, here is the code snippet

    Code:
        <worldbody>
    
        <body name="B1">  
            <composite type="grid" count="9 9 1" spacing="0.05" offset="0 0 1">
                <skin rgba=".1 .8 .1 1" inflate="0.001" subgrid="3"/>
                <pin coord="0 0"/>
                <pin coord="8 0"/>
                <geom size=".02"/>
            </composite>
        </body>
    
        <body name="B2">
            <composite type="grid" count="9 9 1" spacing="0.05" offset="0 2 1">
                <skin rgba=".1 .8 .1 1" inflate="0.001" subgrid="3"/>
                <pin coord="0 0"/>
                <pin coord="8 0"/>
                <geom size=".02"/>
            </composite>
        </body>
         </worldbody>
    trying to load this environment into ./simulate gives the following error
    What is the workaround for this ?
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Use the "prefix" attribute of <composite>