Skip to content

novaphy.RecordedConstraintReaction

Single joint / constraint reaction sample appended via SimulationExporter.add_constraint_reaction. Records the 6D wrench (force + torque) the solver applied at a constraint in a single frame, suitable for offline analysis of joint loading.

Attributes

Attribute Description
time Simulation time [s].
joint_name Joint name (matches the entries in SceneBuildMetadata.joint_names).
wrench 6D wrench [τ_x, τ_y, τ_z, f_x, f_y, f_z] (Featherstone convention: angular components first) expressed in world coordinates.

Example

import novaphy

exporter = novaphy.SimulationExporter()
# ... extract reaction wrenches from your solver and feed them in ...

reaction = novaphy.RecordedConstraintReaction()
reaction.time = t
reaction.joint_name = "shoulder"
reaction.wrench = wrench_world  # shape (6,)
exporter.add_constraint_reaction(reaction)

exporter.write_constraint_reactions_csv("reactions.csv")

Notes

  • NovaPhy currently does not auto-emit constraint reactions during solver.step — callers are expected to query their solver-specific reaction view and feed entries through add_constraint_reaction.
  • Constraint-reaction wrenches follow the Featherstone [torque; force] convention used by the spatial-algebra helpers in novaphy.math. SimState.body_f uses the separate flat-body order [force; torque].

See Also