fix(sim): report gripper readback in the command coordinate - #3697
Conversation
The sim published the raw MJCF joint value as gripper state while the command path inverts joint->ctrl, so a closed gripper read back as the open end of its range (normalized 1.00 under PR #3381's convention). Reflect the readback about the published joint range so a read equals the command that produced it.
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Greptile SummaryThis change aligns simulated gripper feedback with the coordinate system used by gripper commands. Raw MuJoCo joint position is reflected across the declared gripper range, so closed and open feedback retain their intended meanings for command consumers. The endpoint, midpoint, and normalized closed-state cases are covered in the updated adapter tests. T-Rex validation blockedFocused shared-memory round-trip and adapter-test execution could not complete because the repository Confidence Score: 5/5No product defect was established in the changed gripper coordinate conversion; the implementation matches the simulator's inverse command mapping. There are no final actionable findings. Code inspection shows the reader reflection maps the raw simulated joint value back to the command coordinate while preserving the existing invalid-range fallback. Files Needing Attention: No files require author changes. Runtime confirmation remains unavailable until the local Python interpreter and required packages are restored.
What T-Rex did
Reviews (1): Last reviewed commit: "fix(sim): report gripper readback in the..." | Re-trigger Greptile |
The finding
The two sides of the SHM gripper block disagreed on which end of the joint
range means closed:
So the readback ran opposite to the coordinate commands are given in. Measured
on
data/xarm7(mj_stepto steady state):Solution
The sim was handing back MuJoCo's raw joint angle, which counts up as the jaws shut. Commands count down. Same physical state, opposite numbers.
The fix flips the readback so it lands on the command's scale. Now you send 0.0 and read 0.0.