Observables
Tutorials Contact forces and regularization · Joint reaction forces
Allocate observable arrays once, before capture, and pass them to every step:
from newton.solvers import SolverSteel
solver = SolverSteel(model, enable_sleeping=True)obs = solver.observables( {SolverSteel.ObservableKind.BODY_PARENT_F, SolverSteel.ObservableKind.CONTACT_F, SolverSteel.ObservableKind.BODY_AWAKE}, contacts=contacts,)solver.step(state_0, state_1, control, contacts, dt, observables=obs)obs.body_parent_f # (body_count,) spatial vectors: force [N], torque [N·m], world frameobs.contact_f # per rigid contact row: force on shape 0's body [N]obs.body_awake # (body_count,) bool| Observable | What it reports | Limits |
|---|---|---|
body_ |
The wrench the parent applies to each body through its inbound joint, from the step’s solved motion: inverse dynamics at the post-solve accelerations, less gravity, body_, and the solved contact, friction, spin and loop-closure impulses of its subtree divided by . Linear force first, torque about the body’s center of mass second. |
Built from rigid inertia without armature, like MuJoCo. Loop-closure reactions are left out with pre-elimination. Contact wrenches are summed with atomics, so the last bits can vary run to run. Bodies outside every articulation report zero. |
contact_ |
Per live rigid contact row, the force on shape 0’s body from the solved normal and friction impulses divided by . | Torque part is zero (torsion is not reported). Dropped rows, rows beyond the contact count and contacts of skipped sleeping islands report zero. |
body_ |
True for awake bodies, False for sleeping ones, as of the end of the step that received the container. |
Requires enable_. Bodies welded to the world always read True. |
constraint_ |
Device bool per world plus a global entry: rows, contacts or input lost since the last reset. |
Read in a kernel, or call check_ outside capture. |
constraint_ |
Per family: retained and requested high-water marks, dropped contact rows, overflow excess, overflowing world-steps; and contact_. |
Needs row_; host read outside capture. |
compliance_ |
Compliant contacts prepared in the last step, and compliance_ for those excluded. |
contact_ only; host read outside capture. |
Steel does not simulate tendons, so it reports no tendon observables.
Steel docs and tutorials are licensed under Apache-2.0. Third-party notices. "Skild", "Skild AI" and the Skild logo are trademarks of Skild AI and are not licensed under Apache-2.0.