Update sorting docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,34 +7,37 @@ What Lumi does when SORT is pressed, which part is learned and which part is pla
|
|||||||
## 1. The scene
|
## 1. The scene
|
||||||
|
|
||||||
```
|
```
|
||||||
Lumi (column, arm on its side)
|
Lumi (column; the arm hangs on its right side)
|
||||||
│
|
│
|
||||||
┌────────────────┼────────────────┐ table, top at the proven pick height
|
┌────────────────────┼───────────────────────────────┐ table
|
||||||
│ [ RED box ] ( plate ) [ BLUE box ]
|
│ [ red box ] ( tray, 6 balls ) [ yellow box ]
|
||||||
│ o o
|
└─────────────────────────────────────────────────────┘
|
||||||
│ o o
|
|
||||||
└─────────────────────────────────┘
|
|
||||||
```
|
```
|
||||||
|
|
||||||
| Item | Value | Status |
|
All positions in the arm controller's base frame (x across Lumi's front, y forward, z up), at lift 0.
|
||||||
|
|
||||||
|
| Item | Value | Why |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| Table | the office table used for the proven picks: top at −403 mm in the arm base frame at lift 75 mm | measured ([01](01_HARDWARE_FACTS.md) §1) |
|
| Lift, waist, base | lift **0** (lowest), waist at the front, base parked; only the arm moves | at lift 75 mm (the cups' pick height) the arm cannot hold its fingers straight down at a ball's centre on the table; at lift 0 the table is 75 mm nearer and it can (reach map, `sim/sorting`) |
|
||||||
| Lift, waist, base | lift 75 mm, waist at the front (0°), base parked; nothing but the arm moves in a trial | fixed by this design |
|
| Table | top at −328 mm (−403 mm at lift 75 mm, measured) | 01 §1 |
|
||||||
| Plate | white, shallow, centred on the proven pick centre (−100, 580) mm | position to confirm, plate size to measure |
|
| Tray | wooden tray 28 × 19 × 2.5 cm (outer), centre (150, 550) mm, long side across | inside the area the hand reaches with its fingers straight down: x 0 … 500 mm, y 300 … 650 mm. The cups' pick centre (−100, 580) is outside it |
|
||||||
| Balls | golf practice rubber balls (Coupang item 9233082559); 2–4 per trial, 2 colours to start | **diameter, mass, colours to measure** |
|
| Balls | foam golf practice balls, 42.5 mm, 8 g, red and yellow, 6 in the tray, 90 mm apart across and 75 mm forward | the hand reaches the table with its jaws turned about 45°: the fingers need room on the diagonals too |
|
||||||
| Boxes | open boxes, one per colour, left and right of the plate inside the arm's comfort radius (710 mm) and clear of the head | **size and positions to choose**, then fixed with tape marks |
|
| Boxes | two open boxes 26 × 18 × 8 cm without lids, short side facing the tray, 5 cm from it: centres (−130, 550) and (430, 550) mm | the drop point 45 mm above the rim is reachable over both; 5 cm leaves room for a finger beside an edge ball |
|
||||||
| Light | normal office light; trials also run with the blinds open and closed | — |
|
| Light | normal office light; trials also with the blinds open and closed | — |
|
||||||
|
|
||||||
Box positions are fixed in the arm base frame and written in `data/sort_layout.json` on the Thor. A later version
|
The box positions are fixed and written in `data/sort_layout.json` on the Thor. A later version can find the boxes
|
||||||
can find the boxes with the camera; the first one does not.
|
with the camera.
|
||||||
|
|
||||||
### Choosing the balls
|
**Torso camera:** with this layout the tray sits at the bottom right edge of the torso camera's picture (computed from
|
||||||
|
its calibration: the front right corner is just outside it), and the arm covers the tray while it works over it.
|
||||||
|
The head camera, pitched down, sees the whole tray from above; which camera finds the balls is decided on the robot.
|
||||||
|
|
||||||
- Two colours with far-apart hues and good saturation: **red and blue** first (the colour rule separates them
|
### The balls' colours
|
||||||
with wide margins: red hue < 8 or ≥ 170, blue 85–130). Green or yellow is the third colour.
|
|
||||||
- Avoid white, grey and black balls at first: the colour rule calls anything with low saturation white, grey or
|
- Red and yellow: far apart for the colour rule (red hue < 8 or ≥ 170, yellow 20 … 33). Red and orange are
|
||||||
black, and the plate is white.
|
neighbours (bounds 8 and 20) and are not used together.
|
||||||
- Matte rubber is good for depth (shiny objects jump up to 17 mm).
|
- White balls are possible later: the tray is brown, but the colour rule calls any low-saturation pixel white, grey
|
||||||
|
or black.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,17 @@ on one engine's quirks. Both are built from the same robot description and the s
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 0. What exists (MuJoCo, `sim/sorting/`)
|
||||||
|
|
||||||
|
| File | Contents |
|
||||||
|
|---|---|
|
||||||
|
| `build.py` | writes `sorting.xml`: the scene in the arm controller's base frame (m, z up). Arm joints from the fitted kinematics (`data/arm_kinematics.json`), so a joint's qpos is the controller's angle; JAKA's MiniCobo meshes placed with the Lumi app's link chain (within 1.3 mm of the fitted links); torso, lift, head and base from the vendor URDF at lift 0; the torso camera from its hand-eye calibration; the Zimmer with the straight fingers (jaws coupled, 13 mm stroke, 90 N); table, tray, two boxes, six balls |
|
||||||
|
| `check.py` | the simulated flange against the controller's own flange pose in the 60 calibration samples: **median 0.02 mm, max 0.03 mm, 0.008°**; pictures from three cameras |
|
||||||
|
| `scripted_demo.py` | a scripted sort (inverse kinematics and waypoints, no learning): **6 of 6 balls in their boxes, 51 s** (about 8.5 s a ball at the robot's normal joint speed). The baseline the learned policy is compared with |
|
||||||
|
|
||||||
|
Still guesses in the model: the fingers' direction around the flange and the grasp point (to be taught with a
|
||||||
|
ball), the finger mass, joint motor gains, the box positions on the real table.
|
||||||
|
|
||||||
## 1. Engines
|
## 1. Engines
|
||||||
|
|
||||||
| | Isaac Lab | MuJoCo |
|
| | Isaac Lab | MuJoCo |
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ STOP on every screen already stops skills; no new stop path.
|
|||||||
## 3. Deploy steps
|
## 3. Deploy steps
|
||||||
|
|
||||||
1. Export the student policy (`rl/sorting/export.py`) → `policy.onnx`, `config.json`, `obs.py`, run id.
|
1. Export the student policy (`rl/sorting/export.py`) → `policy.onnx`, `config.json`, `obs.py`, run id.
|
||||||
2. Copy to `real/thor/policies/sort/` in this repository, commit, sync to the Thor (`tools/thor_sync/sync.sh`).
|
2. Put them in `policies/sort/` in lumi-wave on the Thor and commit there.
|
||||||
3. Run `tests/test_sort.py` on the Thor.
|
3. Run `tests/test_sort.py` on the Thor.
|
||||||
4. Restart lumi-api only when the base is not driving (`GET /status` → `base.move_status`).
|
4. Restart lumi-api only when the base is not driving (`GET /status` → `base.move_status`).
|
||||||
5. Dry run ([05](05_SIM_TO_REAL.md) §5 step 1) with the owner at the robot.
|
5. Dry run ([05](05_SIM_TO_REAL.md) §5 step 1) with the owner at the robot.
|
||||||
|
|||||||
@@ -77,12 +77,14 @@ The real success rates are what the project is judged by. Simulation numbers alo
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Where the code will live
|
## Where the code lives
|
||||||
|
|
||||||
|
Everything is in lumi-wave on the Thor (`~/Dev/lumi-wave`), the project the Lumi app talks to.
|
||||||
|
|
||||||
| What | Where |
|
| What | Where |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Training environment, configs, export scripts | `rl/sorting/` in this repository (new) |
|
| Training environment, configs, export scripts | `rl/sorting/` (new) |
|
||||||
| MuJoCo twin of the sorting scene | `sim/sorting/` (new; reuses `sim/lumi.xml`) |
|
| MuJoCo sorting scene | `sim/sorting/`, run with `.venv-sim` (`MUJOCO_GL=egl` for pictures) |
|
||||||
| Robot skill and policy runtime | `real/thor/manipulation/sort.py`, `real/thor/policies/sort/` (deployed to `~/Dev/lumi-wave` on the Thor) |
|
| Robot skill and policy runtime | `manipulation/sort.py`, `policies/sort/` |
|
||||||
| App button | Lumi app, COMMANDS → ARM & OBJECTS |
|
| App button | Lumi app, COMMANDS → ARM & OBJECTS |
|
||||||
| Run records and plots | `rl/sorting/runs/` (large files kept off git) |
|
| Run records and plots | `rl/sorting/runs/` (large files kept off git) |
|
||||||
|
|||||||
Reference in New Issue
Block a user