Repository navigation
[Kamino] Success Metric for Fourbar-pole and DR Legs - #6542
Conversation
Greptile SummaryThis PR adds a unified
Confidence Score: 4/5Safe to merge with the walk_success_rate weight caveat addressed; the metric infrastructure is sound and training behavior is unchanged. The walk_success_rate term sets weight=1.0 and returns zeros on every call, meaning it adds nothing to training. However, the non-zero weight is a structural necessity — the RewardManager skips call entirely for weight=0.0 terms, so changing it to 0.0 (a natural cleanup given that survival_success_rate uses 0.0) would silently freeze the accumulators and cause the metric to always report 0% success. This invariant is not documented anywhere in the code or PR description, making it a quiet trap for future maintainers. walk_env_cfg.py (weight=1.0 constraint on walk_success_rate needs an inline comment) and dr_legs/mdp/rewards.py (walk_success_rate class needs a docstring note about the weight requirement). Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant RM as RewardManager
participant WSR as walk_success_rate
participant SSR as survival_success_rate
participant PU as pole_upright
participant Extras as env.extras
note over RM: Each env step
RM->>WSR: "__call__ [weight=1.0, not skipped]"
WSR->>WSR: accumulate error sums and steps
WSR-->>RM: zeros tensor
RM->>SSR: "__call__ SKIPPED [weight=0.0]"
RM->>PU: __call__
PU->>PU: update consecutive_upright and success
PU-->>RM: sum(cos(pole_angle))
note over RM: Episode end - reset(env_ids)
RM->>WSR: reset(env_ids)
WSR->>Extras: Metrics/success_rate, error_vel_xy, contact_match_rate
RM->>SSR: reset(env_ids)
SSR->>Extras: Metrics/success_rate
RM->>PU: reset(env_ids)
PU->>Extras: Metrics/success_rate
PU->>PU: clear consecutive_upright
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant RM as RewardManager
participant WSR as walk_success_rate
participant SSR as survival_success_rate
participant PU as pole_upright
participant Extras as env.extras
note over RM: Each env step
RM->>WSR: "__call__ [weight=1.0, not skipped]"
WSR->>WSR: accumulate error sums and steps
WSR-->>RM: zeros tensor
RM->>SSR: "__call__ SKIPPED [weight=0.0]"
RM->>PU: __call__
PU->>PU: update consecutive_upright and success
PU-->>RM: sum(cos(pole_angle))
note over RM: Episode end - reset(env_ids)
RM->>WSR: reset(env_ids)
WSR->>Extras: Metrics/success_rate, error_vel_xy, contact_match_rate
RM->>SSR: reset(env_ids)
SSR->>Extras: Metrics/success_rate
RM->>PU: reset(env_ids)
PU->>Extras: Metrics/success_rate
PU->>PU: clear consecutive_upright
Reviews (1): Last reviewed commit: "Add changelog" | Re-trigger Greptile |
5b3d841 to
30c1209
Compare
30c1209 to
5105a08
Compare
363369e to
27b668e
Compare
27b668e to
8e4ad4d
Compare
# Description Add success metrics for the Kamino tasks Adds a unified `Metrics/success_rate` metric to three tasks so training runs and the benchmark tooling can measure task success: - Fourbar-pole: success = pole held within the upright cone (`cos > success_threshold`) for the final `hold_time_s` of the episode. - DR-Legs walk: success = survived AND base velocity tracked within tolerance AND foot-contact pattern matched the reference gait (episode-mean). - DR-Legs hold-pose: success = survived the full episode without falling/tilting. All three emit the standard `Metrics/success_rate` tag, so the benchmark success tracking / `--check_success` early-stop works with no benchmark-side changes. The two threshold/hold params on each metric are logging-only and do not affect training. ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
Description
Add success metrics for the Kamino tasks
Adds a unified
Metrics/success_ratemetric to three tasks so training runs and the benchmark tooling can measure task success:cos > success_threshold) for the finalhold_time_sof the episode.All three emit the standard
Metrics/success_ratetag, so the benchmark success tracking /--check_successearly-stop works with no benchmark-side changes. The two threshold/hold params on each metric are logging-only and do not affect training.Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there