feat(manip): GraspGenX provider on the grasping stack - #3874
Conversation
xarm-grasp-graspgenx swaps HeuristicGraspModule for GraspGenXModule and changes nothing else; the two share every other module. GraspGenXModule already existed and had no caller. Two constants make the swap work. XARM_GRIPPER_SWEEP_VOLUME is the jaw geometry the network reasons about, measured off data/xarm_grasp_sim at the driver joint limits and expressed in GraspGenX's own convention. XARM_GRASP_FRAME_TO_TCP maps what GraspGenX predicts -- a pose on xarm_gripper_base_link, approach along +Z, jaws closing along X -- onto the planning tip frame: the 0.172 m offset is joint_tcp straight out of xarm_gripper.urdf.xacro, and the quarter turn puts the closing axis on the xArm gripper's Y. Ranked candidates also needed pick_object to stop assuming there is only one. It took candidates[0] and gave up if that pose would not plan, which is correct for a single-candidate heuristic and wrong for a spread of a hundred where the best-scoring pose is often the one the arm cannot reach. It now walks up to max_grasp_attempts candidates, demoting only on a planning failure -- a drive or execution fault would repeat identically for every candidate -- and reports the rank it won on.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## mb/grasp-06-one-grasping-stack #3874 +/- ##
===============================================================
Coverage 77.65% 77.66%
===============================================================
Files 1324 1324
Lines 125505 125539 +34
Branches 10915 10916 +1
===============================================================
+ Hits 97465 97503 +38
+ Misses 24895 24893 -2
+ Partials 3145 3143 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Greptile SummaryThis change adds GraspGenX-backed xArm grasping blueprints, agent-enabled variants, xArm-specific gripper/TCP configuration, and bounded retry behavior for ranked grasps after planning failures. The ranked-grasp fallback concern was disproved by execution. A focused harness exercised a successful pregrasp followed by a failed grasp plan for the first pose, then verified that the second pose was selected, executed, retracted, and recorded as the successful grasp. The same harness confirmed that No defects were found. Confidence Score: 5/5The reviewed ranked fallback behavior correctly advances only after a planning failure and preserves an unselected state when its attempt limit is reached. The executed failure path contradicted the identified fallback concern, and no findings remain. Files Needing Attention: No files require follow-up based on the validated behavior.
What T-Rex did
Important Files Changed
Reviews (1): Last reviewed commit: "feat(manip): GraspGenX provider on the g..." | Re-trigger Greptile |
xarm-grasp-graspgenxswapsHeuristicGraspModuleforGraspGenXModuleand changes nothing else; the two share every other module through_XARM_GRASP_MODULES.GraspGenXModulealready existed on main and had no caller.Two constants make the swap work, and both are sourced rather than tuned.
XARM_GRASP_FRAME_TO_TCPmaps what GraspGenX predicts — a pose onxarm_gripper_base_link, approach along +Z, jaws closing along X — onto the planning tip frame: the 0.172 m offset isjoint_tcpread straight out ofxarm_gripper.urdf.xacro, and the quarter turn puts the closing axis on the xArm gripper's Y, which is wheremj_forwardondata/xarm_grasp_simputs the jaw span.XARM_GRIPPER_SWEEP_VOLUMEis the jaw geometry the network reasons about, measured off the same scene at the driver joint limits and expressed in GraspGenX's own convention. It is real gripper geometry, so it holds on hardware too, and the comment says where it came from so the next person can re-measure rather than guess.Ranked candidates also needed
pick_objectto stop assuming there is only one. It tookcandidates[0]and gave up if that pose would not plan — correct for a single-candidate heuristic, wrong for a spread of a hundred where the best-scoring pose is often the one the arm cannot reach. It now walks up tomax_grasp_attemptscandidates, demoting only on a planning failure, because a drive or execution fault would repeat identically for every one of them, and reports the rank it won on.Verified in the grasp sim: 100 ranked proposals in the planning frame, scores 0.84 down, and a pick that completes on rank 0 with score 0.966.
Seventh of nine in the xArm grasping re-landing stack.