AdrianLlopart commited on
Commit
f543f5e
·
verified ·
1 Parent(s): b98828b

chore: publish rSkill OpenRAL/rskill-playbook-stage_for_manipulation v0.1.0

Browse files
Files changed (3) hide show
  1. PLAYBOOK.md +54 -0
  2. SKILL.md +64 -0
  3. rskill.yaml +74 -0
PLAYBOOK.md ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # stage-for-manipulation
2
+
3
+ > **Hand-authored decision procedure (SOP).** Unlike the generated `SKILL.md`
4
+ > discovery view, this file is the *content the S2 Reasoner reads and follows*.
5
+ > It is injected into the reasoner's system prompt when this playbook is
6
+ > installed. The `rskill.yaml` `playbook.body_uri` points here.
7
+
8
+ ## Trigger
9
+ A chosen manipulation rSkill declares a `starting_pose` (pre-grasp) that the
10
+ robot has **not** yet reached (e.g. a pick policy expects the gripper hovering
11
+ above the black bowl, but the arm is parked at home). Dispatching the
12
+ manipulation from a bad initial pose is a common, avoidable grasp failure.
13
+
14
+ ## Preconditions
15
+ - The target manipulation skill and its `starting_pose` are known (read from the
16
+ skill's manifest / contract).
17
+ - An arm-motion **approach** skill is installed — the collision-aware MoveGroup
18
+ plan-arm rSkill (`openral-moveit-plan-arm`) — and/or a navigate skill
19
+ for mobile bases.
20
+
21
+ ## Steps
22
+ 1. **Read the pre-grasp.** Read the target manipulation skill's `starting_pose`
23
+ (the declared pre-grasp the policy expects to begin from).
24
+ 2. **Base staging (mobile only).** If the robot has a mobile base, `resolve_place`
25
+ a stand pose that puts the target inside the arm's workspace, then
26
+ `execute_rskill(NAVIGATE, goal=place)`. Skip on a fixed-base arm.
27
+ 3. **Approach to pre-grasp.** `execute_rskill` the collision-aware **approach**
28
+ skill (the MoveGroup plan-arm rSkill) retargeted at `starting_pose`,
29
+ so the arm moves to the pre-grasp under MoveIt. **Never** a hand-rolled IK.
30
+ 4. **Verify.** `query_scene` to confirm the pre-grasp ("is the gripper positioned
31
+ above the black bowl?"). Treat an unconfirmed pose as not staged.
32
+ 5. **Hand back.** Only once verified, return control so the manipulation policy
33
+ runs from a good initial pose.
34
+
35
+ ## Verify (done predicate)
36
+ The gripper (and base, for mobile embodiments) are at the declared `starting_pose`
37
+ pre-grasp, **confirmed by `query_scene`**. An unverified pose is a failure, not a
38
+ success — do not hand control to the manipulation policy.
39
+
40
+ ## Fallbacks
41
+ - The approach skill cannot plan a collision-free path to `starting_pose`
42
+ (obstructed / unreachable pre-grasp) → `emit_prompt` that staging failed, so the
43
+ reasoner replans or hands off rather than dispatching a manipulation from a bad
44
+ pose. This is the terminal human-handoff rung of the replanning ladder.
45
+ - Pairs with the **preflight-reach** playbook (which checks reachability before a
46
+ skill is even chosen); this one stages and verifies the chosen skill's pose.
47
+ - **Never** loop past `max_steps`. Every approach attempt and its outcome are on
48
+ the OTel trace, so staging is replayable.
49
+
50
+ ## Safety
51
+ This playbook only *decides* and *sequences*. Every motion it triggers is an
52
+ `execute_rskill` → Action chunk that still crosses the C++ safety kernel; a bad
53
+ `starting_pose` yields a plan the kernel still vetoes, never a relaxed check
54
+ (CLAUDE.md §1.1).
SKILL.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: stage-for-manipulation
3
+ description: >-
4
+ S2 decision-procedure playbook (weightless). Capabilities: plan on manipulation target. S2 decision procedure: move the robot into a manipulation skill's declared pre-grasp / starting pose (and verify it) before the manipulation policy runs, reducing grasp failures from bad initial poses. Composes resolve_place, execute_rskill, query_scene and memory_write over a collision-aware approach skill. Discovery view of an OpenRAL rSkill — NOT directly runnable by an agent harness; it runs via rSkill.from_pretrained + the robot HAL.
5
+ metadata:
6
+ openral_rskill: true # generated discovery view of an rSkill
7
+ schema_version: 0.1
8
+ rskill_id: OpenRAL/rskill-playbook-stage_for_manipulation
9
+ manifest: ./rskill.yaml
10
+ role: s2
11
+ kind: playbook
12
+ embodiment_tags: [any]
13
+ actions: [plan]
14
+ objects: [manipulation target]
15
+ scenes: [kitchen, indoor]
16
+ chunk_size: 1
17
+ latency_budget: {per_chunk_ms: 5000.0}
18
+ license_code: Apache-2.0
19
+ license_weights: apache-2.0
20
+ paper_url: https://github.com/OpenRAL/openral/blob/master/docs/decisions.md
21
+ ---
22
+
23
+ # stage-for-manipulation — rSkill discovery view
24
+
25
+ > **Generated view, not a hand-written skill.** This `SKILL.md` is a discovery-only
26
+ > mirror of [`rskill.yaml`](./rskill.yaml), produced by `tools/generate_rskill_skillmd.py`.
27
+ > It lets tools that read the standard agent-skill format find and reason about this
28
+ > OpenRAL rSkill. The `rskill.yaml` manifest is the single source of truth
29
+ > (CLAUDE.md §1.3). Do not edit by hand — edit the manifest and regenerate.
30
+
31
+ ## What it is
32
+
33
+ An OpenRAL **decision-procedure playbook (weightless)** (`role: s2`, `kind: playbook`). S2 decision procedure: move the robot into a manipulation skill's declared pre-grasp / starting pose (and verify it) before the manipulation policy runs, reducing grasp failures from bad initial poses. Composes resolve_place, execute_rskill, query_scene and memory_write over a collision-aware approach skill.
34
+
35
+ ## Capabilities
36
+
37
+ - **Verbs:** plan
38
+ - **Objects:** manipulation target
39
+ - **Scenes:** kitchen · indoor
40
+ - **Embodiments:** any
41
+
42
+ ## Why this is discovery-only
43
+
44
+ An agent skill is natural-language instructions loaded into an LLM's context. An rSkill
45
+ is an executable artifact: it carries a typed capability/embodiment contract
46
+ a runtime, and a license/provenance gate — none of which fit in freeform markdown. So an
47
+ agent can use this view to *select* the right skill, but cannot *execute* it by loading
48
+ this file. Execution always goes through the OpenRAL loader and the robot HAL.
49
+
50
+ ## License
51
+
52
+ - **Code:** Apache-2.0. This is a weightless rSkill (the manifest *is* the artifact).
53
+
54
+ ## How to actually run it (not via an agent harness)
55
+
56
+ ```python
57
+ from openral_rskill import rSkill
58
+
59
+ skill = rSkill.from_pretrained("OpenRAL/rskill-playbook-stage_for_manipulation")
60
+ # the loader validates embodiment / sensors / runtime / quantization against the target
61
+ # RobotDescription and enforces the weight-license gate before any weights load.
62
+ ```
63
+
64
+ See [`rskill.yaml`](./rskill.yaml) for the authoritative, validated manifest.
rskill.yaml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # rSkill manifest — stage-for-manipulation (kind: playbook)
2
+ #
3
+ # A symbolic S2 *decision procedure* the Reasoner reads (not a neural policy):
4
+ # move the robot into a manipulation skill's declared pre-grasp / starting pose
5
+ # and verify it before the manipulation policy runs. Composes existing read-only +
6
+ # actuating reasoner tools; carries no weights and never actuates directly (every
7
+ # motion it triggers is an ExecuteRskill → Action chunk → C++ safety kernel).
8
+
9
+ schema_version: "0.1"
10
+ name: "OpenRAL/rskill-playbook-stage_for_manipulation"
11
+ version: "0.1.0"
12
+ license: "apache-2.0"
13
+ role: "s2"
14
+ kind: "playbook"
15
+
16
+ # Embodiment-agnostic — a playbook is gated by capabilities_required, not by a
17
+ # specific embodiment. Declared explicitly with the "any" wildcard (never an
18
+ # empty list, which the manifest validator rejects).
19
+ embodiment_tags: ["any"]
20
+
21
+ # Real RobotCapabilities flag: verifying the pre-grasp pose requires a camera. The
22
+ # loader's capability gate (openral_rskill.loader.check_capability_flags) raises
23
+ # ROSCapabilityMismatch on any robot that does not declare `has_vision: true`,
24
+ # or on an unknown flag name — so only real capability fields belong here. The
25
+ # arm-motion / navigation the SOP performs is gated at runtime by the composed
26
+ # tools' own requirements, not by this playbook's flags.
27
+ capabilities_required:
28
+ has_vision: true
29
+
30
+ # A playbook actuates nothing itself.
31
+ actuators_required: []
32
+
33
+ # Required field; pinned to 1 like the perception kinds (no Action rows).
34
+ chunk_size: 1
35
+
36
+ # S2 planning budget (~0.2 Hz tick). CI enforces on the reference host.
37
+ latency_budget:
38
+ per_chunk_ms: 5000.0
39
+
40
+ description: >
41
+ S2 decision procedure: move the robot into a manipulation skill's declared
42
+ pre-grasp / starting pose (and verify it) before the manipulation policy runs,
43
+ reducing grasp failures from bad initial poses. Composes resolve_place,
44
+ execute_rskill, query_scene and memory_write over a collision-aware approach
45
+ skill.
46
+
47
+ # RSkillAction.PLAN — registry/discovery metadata only (a playbook is role s2,
48
+ # never an ExecuteSkill dispatch verb).
49
+ actions:
50
+ - "plan"
51
+
52
+ objects:
53
+ - "manipulation target"
54
+ scenes:
55
+ - "kitchen"
56
+ - "indoor"
57
+
58
+ # Provenance citation (a playbook has no weights / upstream model repo, so a
59
+ # citation is still required for publish-readiness — CLAUDE.md §6.4). The
60
+ # The authoring decision record is private (OpenRAL/management); this points at
61
+ # the public stub that explains where it lives.
62
+ paper_url: "https://github.com/OpenRAL/openral/blob/master/docs/decisions.md"
63
+
64
+ # The playbook decision-procedure contract.
65
+ playbook:
66
+ trigger: "a manipulation skill declares a starting_pose or pre-grasp that the robot is not currently in"
67
+ body_uri: "./PLAYBOOK.md"
68
+ composes_tools:
69
+ - "resolve_place"
70
+ - "execute_rskill"
71
+ - "query_scene"
72
+ - "memory_write"
73
+ done_predicate: "the robot is in the skill's declared pre-grasp / starting pose, verified, and ready to dispatch the manipulation"
74
+ max_steps: 8