Skip to content

How to rotate objects higher than the ground? #438

Discussion options

You must be logged in to vote
  1. Define your cup body in the worldbody at a specific position (say offset by 5 cm from the ground)
  2. Add degrees of freedom to the cup body as you see fit. For example a ball joint or an X-axis hinge joint.

Here's an example of this using the mug.xml file in the model directory.

test.mov
XML file
<mujoco model="mug">
<visual>
  <headlight ambient="0 0 0" diffuse="0 0 0" specular="1 1 1"/>
  <quality shadowsize="8192"/>
</visual>

<asset>
  <texture name="mug" file="mug.png" type="2d"/>
  <material name="mug" texture="mug" specular="1" shininess="1"/>
  <mesh file="mug.obj" scale=".01 .01 .01"/>
  <material name="floor" reflectance=".1"/>
</asset>

<default>
  <default class="coll…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@miyukin73
Comment options

Answer selected by yuvaltassa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants