Mujoco KDL Wrapper  0.3.18
MuJoCo + KDL bridge for robot kinematics and dynamics
Loading...
Searching...
No Matches
Documentation

Migrating from 0.3.1

step() no longer sleeps. Pacing moved out of the physics call and into pace_realtime(), so a loop that owns its own timing is no longer fought by a hidden sleep inside step(). A windowed run that should track wall time needs one pace_realtime(&robot) call per iteration; headless runs are unaffected, because pacing only ever happened when a viewer existed. See Loop Pacing and the Real-Time Factor.

Migrating from 0.2.x

0.3.0 removes the euler placement field from RobotSpec, AttachmentSpec, SceneObject and CameraSpec, and from attach_child(). Placement orientation is now the quaternion quat, in [x, y, z, w] order, with identity { 0, 0, 0, 1 }. There is no compatibility shim: code setting euler no longer compiles.

quat is the library's own convention. MuJoCo's [w, x, y, z] ordering stays inside the wrapper and is never exposed through these specs.

C++, a 180-degree flip about x:

// 0.2.x
cam.euler = { 180.0, 0.0, 0.0 };
// 0.3.0
cam.quat = { 1.0, 0.0, 0.0, 0.0 };

Python, the same rotation:

# 0.2.x
cam.euler = [180.0, 0.0, 0.0]
# 0.3.0
cam.quat = [1.0, 0.0, 0.0, 0.0]

For angles without an exact quaternion, convert with SciPy – Rotation.from_euler("xyz", [rx, ry, rz], degrees=True).as_quat() returns [x, y, z, w] directly.