Recalibrate the grasp point and camera for reliable top grasps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,9 +28,9 @@
|
|||||||
-301.0
|
-301.0
|
||||||
],
|
],
|
||||||
"tcp_offset_flange": [
|
"tcp_offset_flange": [
|
||||||
88.1,
|
85.6,
|
||||||
-61.6,
|
-80.6,
|
||||||
179.8
|
175.0
|
||||||
],
|
],
|
||||||
"tcp_offset_note": "new fingers, 2026-10-29: mean of 3 owner's free-drive side grasps (data/grasp_side_teach.json; cup in the hooks' belly, grasp turned -24..-33 deg; the cup's centre seen after the hand backed out), spread under 1 mm; then 1 mm to the left across the fingers (the first auto side grasp brushed the cup with the right finger, owner); the old point was 43.5 mm too far out along the fingers. Height kept from the tape (hook bottom 20 mm over a 142 mm cup's rim + 8 mm). Before: [83.2, -69.2, 221.8]"
|
"tcp_offset_note": "new fingers, 2026-10-29: fitted to 7 owner's free-drive top grasps (data/grasp_top_teach.json; the cup centred in the hooks' belly about 5 cm under the rim, grasp turned -45..+32 deg, 4 cup spots) together with the camera's cup-centre error (vision/objects.py ROUND_FIX_MM): every sample within 5 mm; the height so that BELOW_RIM_MM puts the hooks where the owner held them. Before: [88.1, -61.6, 179.8]"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
{
|
||||||
|
"note": "owner's free-drive top grasps: flange pose with the cup in the hooks' belly at the height to hold it; the cup's (x, y, top) seen after the hand went up; arm frame, mm / deg",
|
||||||
|
"samples": [
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
-32.73,
|
||||||
|
395.05,
|
||||||
|
-122.97,
|
||||||
|
85.34,
|
||||||
|
45.38,
|
||||||
|
-138.41
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-179.5,
|
||||||
|
526.0,
|
||||||
|
-185.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
-67.74,
|
||||||
|
377.14,
|
||||||
|
-106.16,
|
||||||
|
88.52,
|
||||||
|
46.09,
|
||||||
|
-148.56
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-179.0,
|
||||||
|
527.0,
|
||||||
|
-186.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
-109.59,
|
||||||
|
353.26,
|
||||||
|
-109.32,
|
||||||
|
87.41,
|
||||||
|
46.54,
|
||||||
|
-166.57
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-177.0,
|
||||||
|
529.0,
|
||||||
|
-180.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
-99.1,
|
||||||
|
372.04,
|
||||||
|
-126.48,
|
||||||
|
83.73,
|
||||||
|
46.66,
|
||||||
|
176.53
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-121.0,
|
||||||
|
561.0,
|
||||||
|
-186.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
83.91,
|
||||||
|
434.11,
|
||||||
|
-112.24,
|
||||||
|
86.4,
|
||||||
|
45.29,
|
||||||
|
-123.79
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-94.0,
|
||||||
|
532.0,
|
||||||
|
-185.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
49.81,
|
||||||
|
358.44,
|
||||||
|
-121.65,
|
||||||
|
83.94,
|
||||||
|
46.84,
|
||||||
|
-139.16
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-104.0,
|
||||||
|
493.0,
|
||||||
|
-188.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
67.96,
|
||||||
|
403.95,
|
||||||
|
-116.63,
|
||||||
|
85.47,
|
||||||
|
46.75,
|
||||||
|
-105.22
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-126.0,
|
||||||
|
445.0,
|
||||||
|
-185.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flange": [
|
||||||
|
22.91,
|
||||||
|
319.2,
|
||||||
|
-123.94,
|
||||||
|
83.73,
|
||||||
|
46.66,
|
||||||
|
-138.47
|
||||||
|
],
|
||||||
|
"cup": [
|
||||||
|
-125.0,
|
||||||
|
446.0,
|
||||||
|
-188.0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -98,6 +98,7 @@ Every value here is a constant at the top of its file, with a comment on what it
|
|||||||
| `tasks/fetch.py` | `WAIST_STEP_DEG` | 10° | "Give me your hand" turns the waist toward the person while the arm moves, in moves this long: a STOP ends the turn after the move it is in. Bigger is smoother, smaller stops sooner |
|
| `tasks/fetch.py` | `WAIST_STEP_DEG` | 10° | "Give me your hand" turns the waist toward the person while the arm moves, in moves this long: a STOP ends the turn after the move it is in. Bigger is smoother, smaller stops sooner |
|
||||||
| `manipulation/skills.py` | `BACK_OUT_NEAR_MM` | 30 mm | A pick stopped with the hand within this of its way in: the next pick first backs out the way it came (side: out, then up; top: up) |
|
| `manipulation/skills.py` | `BACK_OUT_NEAR_MM` | 30 mm | A pick stopped with the hand within this of its way in: the next pick first backs out the way it came (side: out, then up; top: up) |
|
||||||
| `tasks/fetch.py` | `WIDTH_NEAR_MM` | 250 mm | A width further than this from the pick zone does not refuse a pick (far widths read ~8 mm too wide); measured again up close |
|
| `tasks/fetch.py` | `WIDTH_NEAR_MM` | 250 mm | A width further than this from the pick zone does not refuse a pick (far widths read ~8 mm too wide); measured again up close |
|
||||||
|
| `manipulation/skills.py` | `BELOW_RIM_MM` | 32 mm | Top grasp: the grasp point this far below the cup's top (40 let a cup narrower lower down slip out; 25 left the fingers' top over the rim) |
|
||||||
| `manipulation/skills.py` | `MIN_WIDTH`, `MAX_WIDTH` | 70, 97 mm | Object widths the gripper takes from above (the open tips 100, margin 3; wider cups are taken from the side; belly 102 / 77, tips 100 / 73; [10_GRIPPER.md](10_GRIPPER.md)). `MIN_WIDTH` 61 enables the finger-tip grasp (61–72 mm) |
|
| `manipulation/skills.py` | `MIN_WIDTH`, `MAX_WIDTH` | 70, 97 mm | Object widths the gripper takes from above (the open tips 100, margin 3; wider cups are taken from the side; belly 102 / 77, tips 100 / 73; [10_GRIPPER.md](10_GRIPPER.md)). `MIN_WIDTH` 61 enables the finger-tip grasp (61–72 mm) |
|
||||||
| `manipulation/skills.py` | `BELLY_MIN_MM` | 70 mm | Thinner objects are held between the finger tips (the belly closes only to 68 mm) |
|
| `manipulation/skills.py` | `BELLY_MIN_MM` | 70 mm | Thinner objects are held between the finger tips (the belly closes only to 68 mm) |
|
||||||
| `manipulation/skills.py` | `SIDE_MAX_WIDTH`, `SIDE_BAND_MM`, `SIDE_SEEN_MM` | 97, 12, 0 mm | Side grasp of a cup too wide at the top: the width the fingers meet (seen + `SIDE_SEEN_MM`; the camera reads a cup's lower part about right, unlike its rim) must be `MIN_WIDTH`..this (open tips 100 mm) from `SIDE_BAND_MM` below to above the grasp point (the hooks are ~16 mm thick) |
|
| `manipulation/skills.py` | `SIDE_MAX_WIDTH`, `SIDE_BAND_MM`, `SIDE_SEEN_MM` | 97, 12, 0 mm | Side grasp of a cup too wide at the top: the width the fingers meet (seen + `SIDE_SEEN_MM`; the camera reads a cup's lower part about right, unlike its rim) must be `MIN_WIDTH`..this (open tips 100 mm) from `SIDE_BAND_MM` below to above the grasp point (the hooks are ~16 mm thick) |
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ PATH_SAG_MM = 20.0 # a joint move may take the gri
|
|||||||
TIP_MM = 60.0 # the hand's lowest part this far below the grasp point (estimate, kept
|
TIP_MM = 60.0 # the hand's lowest part this far below the grasp point (estimate, kept
|
||||||
# as a margin: the fingers lie level; the taught tips grasp had the
|
# as a margin: the fingers lie level; the taught tips grasp had the
|
||||||
# grasp point 113 mm above the table, owner's tape: finger plane 135)
|
# grasp point 113 mm above the table, owner's tape: finger plane 135)
|
||||||
BELOW_RIM_MM = 40.0 # grasp this far below the object's top
|
BELOW_RIM_MM = 32.0 # grasp this far below the object's top: a cup narrower lower down slipped
|
||||||
|
# out at 40, held at 25 with the fingers' top a little over the rim
|
||||||
|
# (they are 13 mm thick; owner, 2026-10-29)
|
||||||
ABOVE_MM = 100.0 # approach / retreat height over the grasp pose
|
ABOVE_MM = 100.0 # approach / retreat height over the grasp pose
|
||||||
LIFT_MM = 30.0 # first lift after closing, then check the grip again
|
LIFT_MM = 30.0 # first lift after closing, then check the grip again
|
||||||
MAX_TILT_DEG = 15.0 # deg; a held cup's axis may lean this far from vertical on a joint
|
MAX_TILT_DEG = 15.0 # deg; a held cup's axis may lean this far from vertical on a joint
|
||||||
|
|||||||
+2
-1
@@ -23,7 +23,8 @@ TOOL = 1 # set_digital_output type: 0 cabinet, 1 tool (TIO),
|
|||||||
CLOSE_DO, OPEN_DO = 0, 1 # DO_1, DO_2 (0-based)
|
CLOSE_DO, OPEN_DO = 0, 1 # DO_1, DO_2 (0-based)
|
||||||
CLOSED_AI = 400 # AI_1 above this = closed on something (open reads 130-165; an 82 mm metal cup
|
CLOSED_AI = 400 # AI_1 above this = closed on something (open reads 130-165; an 82 mm metal cup
|
||||||
# held in the cup fingers reads ~2200-2300, 2026-10-13)
|
# held in the cup fingers reads ~2200-2300, 2026-10-13)
|
||||||
EMPTY_AI = 3900 # closed above this = nothing between the fingers (empty reads 4100-4200, noise +-50)
|
EMPTY_AI = 4000 # closed above this = nothing between the fingers (these fingers empty: 4084-4158; an 84 mm
|
||||||
|
# rim cup held ~4 cm down read 3902, 2026-10-29)
|
||||||
AI_OPEN, AI_SHUT = 140.0, 4160.0 # AI_1 fully open / closed on nothing (2026-10-19)
|
AI_OPEN, AI_SHUT = 140.0, 4160.0 # AI_1 fully open / closed on nothing (2026-10-19)
|
||||||
# inner gap (mm) between the fingers, (open, closed), measured by the owner (docs/gripper/README.md; the neck and the
|
# inner gap (mm) between the fingers, (open, closed), measured by the owner (docs/gripper/README.md; the neck and the
|
||||||
# straight part "shank" not measured again, the earlier ones kept); the gap is taken as linear in AI_1
|
# straight part "shank" not measured again, the earlier ones kept); the gap is taken as linear in AI_1
|
||||||
|
|||||||
+2
-2
@@ -49,8 +49,8 @@ cup = lambda x, y, top=-260.0: {"name": "cup", "colour": "grey", "x": float(x),
|
|||||||
reach = lambda o: skills.reachable_pick(o, accept=fetch._carry_ok)
|
reach = lambda o: skills.reachable_pick(o, accept=fetch._carry_ok)
|
||||||
trusted = lambda o: skills.reachable_pick(o, accept=fetch._carry_ok, max_yaw=skills.TRUSTED_YAW_DEG) # fetch's first try
|
trusted = lambda o: skills.reachable_pick(o, accept=fetch._carry_ok, max_yaw=skills.TRUSTED_YAW_DEG) # fetch's first try
|
||||||
|
|
||||||
plan = reach(cup(-96, 598)) # picked live 2026-10-2x 15:39 (J5 +20, no turn): now
|
plan = reach(cup(-96, 598)) # picked live 2026-10-2x 15:39 (J5 +20, no turn): planned
|
||||||
assert plan and round(skills.yaw_of(plan[0][1][1])) == -15, plan # no IK at the grasp unturned there; -15 is trusted
|
assert plan and round(skills.yaw_of(plan[0][1][1])) == 0, plan # unturned, J5 +22
|
||||||
for xy in ((-171, 697), (-395, 629), (-480, 652)): # refused live from where it stood: still out of reach
|
for xy in ((-171, 697), (-395, 629), (-480, 652)): # refused live from where it stood: still out of reach
|
||||||
assert reach(cup(*xy)) is None, xy # of the arm alone at waist 0 (base moved then)
|
assert reach(cup(*xy)) is None, xy # of the arm alone at waist 0 (base moved then)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ head_cam.head_centre = lambda: np.array([-92.97, -19.87, 356.12]) # the head's
|
|||||||
|
|
||||||
cup = {"name": "cup", "colour": "white", "x": -126.5, "y": 613.0, "top_mm": -261.0, "width_mm": 72.0}
|
cup = {"name": "cup", "colour": "white", "x": -126.5, "y": 613.0, "top_mm": -261.0, "width_mm": 72.0}
|
||||||
R = calib.rpy_matrix(*skills.GRASP_RPY)
|
R = calib.rpy_matrix(*skills.GRASP_RPY)
|
||||||
g = np.array([cup["x"], cup["y"], cup["top_mm"] - 40])
|
g = np.array([cup["x"], cup["y"], cup["top_mm"] - skills.BELOW_RIM_MM])
|
||||||
|
|
||||||
(n1, above), (n2, grasp), (n3, lift) = skills.plan_pick(cup)
|
(n1, above), (n2, grasp), (n3, lift) = skills.plan_pick(cup)
|
||||||
assert np.allclose(grasp[:3], g - R @ skills.GRASP_OFFSET) and grasp[3:] == list(skills.GRASP_RPY)
|
assert np.allclose(grasp[:3], g - R @ skills.GRASP_OFFSET) and grasp[3:] == list(skills.GRASP_RPY)
|
||||||
|
|||||||
+3
-2
@@ -33,8 +33,9 @@ EDGE_PCT = (1, 99) # percentiles taken as the object's edges (robust to
|
|||||||
MIN_SATURATION = 50 # HSV S below this is white / grey / black
|
MIN_SATURATION = 50 # HSV S below this is white / grey / black
|
||||||
DARK_V = 60 # HSV V below this has no hue the camera can tell (black trousers: V ~48, S ~95, read
|
DARK_V = 60 # HSV V below this has no hue the camera can tell (black trousers: V ~48, S ~95, read
|
||||||
# "blue"; blue jeans V ~90, 2026-10-22)
|
# "blue"; blue jeans V ~90, 2026-10-22)
|
||||||
ROUND_FIX_MM = (13.9, -3.1) # mm (x, y), arm frame, added to a round thing's centre: the camera read cup centres this
|
ROUND_FIX_MM = (19.0, -4.0) # mm (x, y), arm frame, added to a round thing's centre: the camera read cup centres this
|
||||||
# far off, mean of three spots 7-11 cm apart (hover readings, 2026-10-27; +-4 mm between them)
|
# far off; fitted with the grasp point to 8 free-drive top grasps at 5 spots (2026-10-29,
|
||||||
|
# data/grasp_top_teach.json, centres seen without this fix; every one within 5 mm)
|
||||||
EDGE_PX = 4 # a box this close to the bottom of the frame is cut off: height and centre z unknown
|
EDGE_PX = 4 # a box this close to the bottom of the frame is cut off: height and centre z unknown
|
||||||
STALE_S = 1.5 # s; an older detection file means the camera service is not live
|
STALE_S = 1.5 # s; an older detection file means the camera service is not live
|
||||||
SURE_SCORE = 0.35 # a box scoring less (person.WEAK_SCORE) is kept only when depth measures this size there:
|
SURE_SCORE = 0.35 # a box scoring less (person.WEAK_SCORE) is kept only when depth measures this size there:
|
||||||
|
|||||||
Reference in New Issue
Block a user