Skip to content

Commit 30b4eec

Browse files
committed
add belief-guided grasp selection example
Add examples/manipulation/08_belief_grasp_selection.py. The tabletop hides the object's orientation among three discrete pose hypotheses, each best served by a different grasp. The agent maintains a belief over the poses, picks the grasp with the highest expected success across that belief, runs a Bayes update on every miss, and retries until one grasp lands. Cover the loop with a smoke test that locks success, belief_update_count >= 1, at least one grasp_miss failure, and that the final belief argmax matches the true pose. Register a GIF maker and the rendered GIF. Update README, examples/README.md, examples/manipulation/README.md, docs/status.md, docs/plan.md, and docs/learning_paths.md to reflect the new example, GIF, and test counts (24 examples, 23 GIFs, 66 tests).
1 parent 7448e79 commit 30b4eec

10 files changed

Lines changed: 414 additions & 23 deletions

File tree

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ robotics loops rather than standalone algorithms.
1111

1212
## Current Status
1313

14-
- 23 runnable examples
14+
- 24 runnable examples
1515
- 20 learning-path roadmap examples
16-
- 22 README GIFs generated from runnable examples
17-
- 65 smoke and regression tests
16+
- 23 README GIFs generated from runnable examples
17+
- 66 smoke and regression tests
1818
- Core dependencies only: `numpy` and `matplotlib`
1919

2020
See `docs/status.md` for the implementation snapshot and `docs/plan.md` for
@@ -100,6 +100,10 @@ These GIFs are generated from the runnable examples, not separate animations.
100100
| --- | --- |
101101
| ![A target starts under a shelf, the robot detects a blocked grasp, pushes it into open space, and then picks it.](docs/assets/gifs/push_then_grasp.gif) | ![A suction sorter estimates per-object success probabilities, recovers from a suction miss, prepares the seal, retries, and sorts into bins.](docs/assets/gifs/probabilistic_suction_sorting.gif) |
102102

103+
| Belief-guided grasp selection |
104+
| --- |
105+
| ![A grasp agent keeps a belief over three pose hypotheses, picks the grasp with highest expected success, misses, runs a Bayes update, and tries a different grasp.](docs/assets/gifs/belief_grasp_selection.gif) |
106+
103107
### Navigation and recovery
104108

105109
| Reactive obstacle avoidance | Dynamic obstacle avoidance |
32.5 KB
Loading

docs/learning_paths.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
5. `examples/manipulation/05_object_search_and_pick.py`
2828
6. `examples/manipulation/06_push_then_grasp.py`
2929
7. `examples/manipulation/07_probabilistic_suction_sorting.py`
30+
8. `examples/manipulation/08_belief_grasp_selection.py`
3031

3132
## Embodied AI
3233

docs/plan.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ first-run experience small, fast, and failure-aware.
88

99
The repository currently has:
1010

11-
- 23 runnable examples
11+
- 24 runnable examples
1212
- 20 numbered learning-path examples
13-
- 3 extra examples outside the original learning-path roadmap
14-
- 22 generated README GIFs
15-
- 65 smoke and regression tests
13+
- 4 extra examples outside the original learning-path roadmap
14+
- 23 generated README GIFs
15+
- 66 smoke and regression tests
1616
- GitHub Actions CI for Python 3.10, 3.11, and 3.12
1717
- core dependencies limited to `numpy` and `matplotlib`
1818
- optional Gymnasium-style adapters for `GridWorld2D`,
@@ -85,6 +85,10 @@ Recent completed work:
8585
The agent wakes up with a bimodal pose belief, takes information actions
8686
toward the symmetric landmark, then switches one-way to goal navigation
8787
after the belief collapses. A GIF and smoke test cover the loop.
88+
- `examples/manipulation/08_belief_grasp_selection.py` was added. The agent
89+
keeps a belief over three pose hypotheses, picks the grasp with the
90+
highest expected success across that belief, and runs a Bayes update on
91+
every miss until a grasp lands. GIF and smoke test cover the loop.
8892

8993
The next agent should not redo those items. If any of them seem missing, first
9094
check the current branch and latest pulled commit.
@@ -231,25 +235,26 @@ Acceptance criteria:
231235

232236
### Priority 4: Add The Next Example Tier
233237

234-
Goal: grow from 23 examples toward 30 examples without losing readability.
238+
Goal: grow from 24 examples toward 30 examples without losing readability.
235239

236240
Already done from the previous tier:
237241

238242
- `examples/navigation/10_localization_uncertainty_recovery.py` — pose
239243
uncertainty -> information action -> resume goal navigation.
244+
- `examples/manipulation/08_belief_grasp_selection.py` — pose belief ->
245+
grasp choice -> failure update -> retry.
240246

241247
Recommended next examples:
242248

243249
| Priority | Example | Area | Loop |
244250
| --- | --- | --- | --- |
245-
| 1 | `examples/manipulation/08_belief_grasp_selection.py` | manipulation | pose belief -> grasp choice -> failure update |
246-
| 2 | `examples/manipulation/09_active_viewpoint_for_grasp.py` | manipulation | choose view -> reduce occlusion -> grasp |
247-
| 3 | `examples/embodied_ai/21_object_permanence_toy.py` | embodied AI | object disappears -> memory persists -> search |
248-
| 4 | `examples/embodied_ai/22_where_did_i_see_it.py` | embodied AI | memory query -> revisit place -> act |
249-
| 5 | `examples/world_models/23_model_error_recovery.py` | world model | prediction failure -> update model -> recover |
250-
| 6 | `examples/navigation/24_information_gain_navigation.py` | navigation | goal progress vs information gain |
251-
| 7 | `examples/manipulation/25_clear_path_before_pick.py` | manipulation | precondition failure -> clear obstacle -> pick |
252-
| 8 | `examples/navigation/27_multi_agent_avoidance.py` | navigation | observe agents -> avoid -> replan |
251+
| 1 | `examples/manipulation/09_active_viewpoint_for_grasp.py` | manipulation | choose view -> reduce occlusion -> grasp |
252+
| 2 | `examples/embodied_ai/21_object_permanence_toy.py` | embodied AI | object disappears -> memory persists -> search |
253+
| 3 | `examples/embodied_ai/22_where_did_i_see_it.py` | embodied AI | memory query -> revisit place -> act |
254+
| 4 | `examples/world_models/23_model_error_recovery.py` | world model | prediction failure -> update model -> recover |
255+
| 5 | `examples/navigation/24_information_gain_navigation.py` | navigation | goal progress vs information gain |
256+
| 6 | `examples/manipulation/25_clear_path_before_pick.py` | manipulation | precondition failure -> clear obstacle -> pick |
257+
| 7 | `examples/navigation/27_multi_agent_avoidance.py` | navigation | observe agents -> avoid -> replan |
253258

254259
Selection rule:
255260

docs/status.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ see what exists, what is verified, and what should come next.
55

66
## Snapshot
77

8-
- Runnable examples: 23
8+
- Runnable examples: 24
99
- Learning-path roadmap examples: 20
10-
- README GIFs: 22
11-
- Smoke and regression tests: 65
10+
- README GIFs: 23
11+
- Smoke and regression tests: 66
1212
- Core dependencies: `numpy`, `matplotlib`
1313
- Contributor extra: `pip install -e ".[dev]"`
1414
- CI: Python 3.10, 3.11, 3.12
@@ -30,7 +30,7 @@ goal-command example. The numbered 20-example roadmap is tracked in
3030
| --- | ---: | --- |
3131
| Runtime | 2 | smallest observe-act-observe loop, trace replay |
3232
| Navigation | 9 | reactive avoidance, dynamic obstacles, replanning, exploration, belief, active SLAM, MPC, recovery, localization recovery |
33-
| Manipulation | 7 | retry, reactive grasping, IK servo, moving target reaching, search, push recovery, suction sorting |
33+
| Manipulation | 8 | retry, reactive grasping, IK servo, moving target reaching, search, push recovery, suction sorting, belief grasp selection |
3434
| Embodied AI | 4 | controlled goals, memory, POMDP search, tiny VLA loop |
3535
| World models | 1 | action-conditioned dynamics, prediction error, model update, replanning |
3636

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Run any example headless with its `--no-render` flag when available.
3737
| `manipulation/05_object_search_and_pick.py` | `python examples/manipulation/05_object_search_and_pick.py` | search viewpoint -> memory -> pick -> retry |
3838
| `manipulation/06_push_then_grasp.py` | `python examples/manipulation/06_push_then_grasp.py` | blocked grasp -> push world -> grasp |
3939
| `manipulation/07_probabilistic_suction_sorting.py` | `python examples/manipulation/07_probabilistic_suction_sorting.py` | suction miss -> update probability -> prepare -> sort |
40+
| `manipulation/08_belief_grasp_selection.py` | `python examples/manipulation/08_belief_grasp_selection.py` | pose belief -> grasp choice -> miss -> update -> retry |
4041

4142
## Embodied AI
4243

0 commit comments

Comments
 (0)