google-deepmind / mujoco

Multi-Joint dynamics with Contact. A general purpose physics simulator.
https://mujoco.org
Apache License 2.0
7.84k stars 783 forks source link

Gravity: Blocks not falling #1727

Closed omarrayyann closed 3 months ago

omarrayyann commented 3 months ago

For some reason the blocks I add are not falling due to gravity. This is my xml:

<?xml version="1.0" ?>

yuvaltassa commented 3 months ago

See documentation:

"Joints are defined within bodies. They create motion degrees of freedom (DOFs) between the body and its parent. In the absence of joints the body is welded to its parent. This is the opposite of gaming engines which use over-complete Cartesian coordinates, where joints remove DOFs instead of adding them. There are four types of joints: ball, slide, hinge, and a “free joint” which creates floating bodies. A single body can have multiple joints. In this way composite joints are created automatically, without having to define dummy bodies. The orientation components of ball and free joints are represented as unit quaternions, and all computations in MuJoCo respect the properties of quaternions."

This is also covered in the introductory tutorial.

omarrayyann commented 3 months ago

Thanks!