Bug Description
SAPCoupler maps a JOINT equality to q1 - q2 = 0: build_constraints in genesis/engine/couplers/sap_coupler.py writes Jt = [1, -1] and compute_regularization takes g0 = q[i_dof1] - q[i_dof2], whatever eq_data holds. The rigid constraint solver honors the full contract, q1 - q1_0 = a0 + a1 * d + a2 * d^2 + a3 * d^3 + a4 * d^4 with d = q2 - q2_0, and after #3290 a missing joint2 as d = 0. So the two couplers simulate different constraints from the same MJCF whenever polycoef differs from 0 1 0 0 0 or joint2 is omitted. #3290 rejects the omitted-joint2 form at build in the SAP coupler; the non-identity polynomial passes through silently.
Expected Behavior
The SAP adapter implements the same contract: J = [1, -deriv] with deriv = a1 + 2 a2 d + 3 a3 d^2 + 4 a4 d^3, g = q1 - q1_0 - poly(d), and d = 0 with the second column dropped when joint2 is absent. The build-time rejection introduced in #3290 goes away with it, and tests/coupling/test_hybrid.py gets the scaled polynomial scene of tests/rigid/test_constraints.py::test_equality_joint_scaling under SAP.
Bug Description
SAPCouplermaps a JOINT equality toq1 - q2 = 0:build_constraintsingenesis/engine/couplers/sap_coupler.pywritesJt = [1, -1]andcompute_regularizationtakesg0 = q[i_dof1] - q[i_dof2], whatevereq_dataholds. The rigid constraint solver honors the full contract,q1 - q1_0 = a0 + a1 * d + a2 * d^2 + a3 * d^3 + a4 * d^4withd = q2 - q2_0, and after #3290 a missingjoint2asd = 0. So the two couplers simulate different constraints from the same MJCF wheneverpolycoefdiffers from0 1 0 0 0orjoint2is omitted. #3290 rejects the omitted-joint2form at build in the SAP coupler; the non-identity polynomial passes through silently.Expected Behavior
The SAP adapter implements the same contract:
J = [1, -deriv]withderiv = a1 + 2 a2 d + 3 a3 d^2 + 4 a4 d^3,g = q1 - q1_0 - poly(d), andd = 0with the second column dropped whenjoint2is absent. The build-time rejection introduced in #3290 goes away with it, andtests/coupling/test_hybrid.pygets the scaled polynomial scene oftests/rigid/test_constraints.py::test_equality_joint_scalingunder SAP.