Robotic Systems

Robotic Systems · teaching-draft · v0.2.0

2. Frames and quaternion integration

Aim

Verify wxyz, body-to-world rotation, and angular-velocity integration independently.

Time: about 120 minutes. Start with the linked lectures and the course notation contract. The reference program is complete and runnable; your work is to explain it, modify it, and test the results.

Run from this repository

uv sync --locked
uv run --locked python practices/p02-attitude/run.py

The program writes configuration, MuJoCo version, and metrics to outputs/p02-attitude/metrics.json. Experiments with a time history also write trajectory.csv. These are generated results and are not source material.

Use a separate configuration and output directory for each variation:

uv run --locked python practices/p02-attitude/run.py --config practices/p02-attitude/config.yml --output outputs/p02-attitude/baseline

Keep the original configuration as the baseline. Record all changes in your report; avoid changing several physical and numerical parameters at once.

Tasks

  1. Derive the Hamilton product and quaternion exponential from Lecture 4.
  2. Check the positive-z quarter-turn maps x to y.
  3. Compare normalized Euler, exponential integration, and MuJoCo's quaternion update from a non-identity pose.
  4. Test opposite-sign quaternions and explain why their attitude distance is zero.

Expected checks

Exponential integration should match the constant-angular-velocity analytic result and MuJoCo to numerical precision. Normalized Euler preserves norm but retains angle error.

Submission

Submit your YAML configuration, a short explanation of the equations and assumptions, labeled plots or numerical comparisons with units, and a paragraph explaining a failure or limitation. Include the exact run command. The weekly practice rubric awards 40% for correctness and checks, 30% for the controlled comparison, 20% for interpretation, and 10% for reproducibility.

Extension

Use time-varying angular velocity and compare step refinement. A constant-rate exact increment does not make an arbitrary time-varying integration exact.

Reading

CMU 16-715 · MuJoCo API