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 exported reaction [m_x, m_y, m_z, f_x, f_y, f_z] 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 CSV files preserve the exporter's historical [moment; force] column order (mx,my,mz,fx,fy,fz). This differs from SimState.body_f and the spatial-algebra helpers, which use [force; torque].

See Also