dimensionalOS / dimensionalOS/dimos
Simplify grasp verification
@mustafab0 is already working on this.
Since Sep 9, 2026.
- Dominant language
- Python
- Stars
- 4.5k
- Forks
- 808
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 233
Description
dimos/manipulation/grasp_verification.py does more than the problem needs, and the extra machinery is where its bugs come from.
The module answers one question: after commanding a close, is something in the jaws? The physics is a single comparison on the settled readback — above closed_position + empty_epsilon means the jaws stalled on something. Everything else exists to work around the fact that GripperControlTask latches a target and measures position every tick but never reports "I am done moving", so await_gripper_settle reconstructs that by RPC-polling position and guessing with a moved or arrived condition.
That guess is the source of both bugs we have hit. Judging arrival by settle_tolerance means a gripper resting against its mechanical stop (the xArm sits at 0.988 of a nominal 850 count) can never "arrive", so re-opening an already-open gripper times out — that is what #3870 patches. Judging it by moved alone has the mirror failure: commanding open on an already-open gripper moves nothing, so it never settles either. Both are latency problems being solved with a position heuristic.
Two other things worth deleting while we are in here:
- Ten config fields, and no blueprint in the repo sets any of them. The only non-definition use anywhere is the
open_toleranceline #3870 adds. RobotModelConfig.grasp_verificationis a second complete copy of that config that nothing ever reads.open_failure/open_toleranceis ambiguous by construction — the open and held bands overlap around 0.85-0.95, so readback cannot distinguish "open" from "holding something wide".held_high/open_margin("jaws never closed") largely duplicates theset_gripper_positionreturn check_command_and_settlealready does.
Proposed shape: sleep once past the actuation latency, poll for N stable readings, then apply the one threshold. That removes moved, arrived, arrival_tolerance, held_high/open_margin, open_failure and the dead config field, and takes the file from ~180 lines and 10 knobs to roughly 90 and 4.
The better fix underneath is to have GripperControlTask report motion-complete, since it already owns both the setpoint and the measurement. Then pick/place waits on a signal instead of polling position across a process boundary and the loop goes away entirely. That touches a control-loop task used beyond manipulation, so it is worth doing separately.
Blast radius for the manipulation-only version is small: pick_and_place_module.py is the single real consumer, plus its tests and the dead RobotModelConfig field.
Filed while landing #3870, which patches the arrival case rather than removing the guess. #3870 stays as the near-term fix so the xArm grasping stack can complete a pick; this issue tracks doing it properly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.