In this article
Contact wrench components need their contact basis, pair direction and reference point; raw vectors from different contacts cannot be summed as world-frame measurements.
Raw contact vectors do not share a basis
A twin monitor sums the first force component from every contact and labels the result world-horizontal load. On a flat support it seems plausible, but the reading changes unexpectedly when the same object touches a slanted wall. Each contact constructs its own spatial basis. The first component has a local contact meaning, not a fixed global direction. Establish a common basis and a body-direction convention before combining data into an object-level force report.
Read contactForce in the contact frame
The API reference specifies that mj_contactForce returns force and torque expressed in the contact frame for the selected contact. The contact model places the normal on the first axis, with the remaining axes spanning the tangent plane. Do not transfer the visualizer’s familiar axis expectations onto this ordering. A large first component indicates normal loading in that contact’s basis; it is not automatically force along a fixed world axis or the robot’s forward direction.
Choose the body and torque reference
The contact description also gives a direction convention between the participating geoms. If aggregating force on a selected object, determine whether that object appears on the corresponding side of each pair and apply a consistent sign. For torques, rotating components into a common orientation is not enough when the desired reference point differs from the contact point. Account for the force’s moment arm when forming an object-centered resultant wrench rather than adding local torques alone.
Propose a rotated-contact inspection
A proposed fixture should compare contacts with clearly different normal orientations and known pair identities. Inspect local force components, contact basis and the transformed force on the chosen body. Include an off-center contact when examining torque aggregation so the reference-point distinction is observable. Keep geometry and computation stage explicit. This is a suggested numerical inspection, not a measured load-cell calibration or an executed contact-force benchmark, and it supplies no invented force magnitudes.
Keep every aggregate traceable to its contacts
Acceptance evidence should retain contact identifiers for the current computation, participating geoms, contact positions, bases, local wrenches and the selected aggregate reference frame and point. Do not treat an array index as a persistent physical-contact identity across arbitrary future steps. If the contact set changes, preserve the mapping used for each aggregate. A scalar total normal load and a net world-force vector answer different questions and should not share an unexplained label.
Separate coordinate correctness from force fidelity
The MD17 force-coordinate guide explains another vector-transformation obligation; software reproducibility supports retaining the model and aggregation logic. Here acceptance establishes consistent interpretation of simulated contact wrenches. It does not calibrate the contact model, prove measured hardware loads or establish impact severity. Correct transformations preserve the meaning of the modeled quantities; independent physical validation determines whether those quantities adequately represent the intended real interaction.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.