Repository navigation
Fix RLinf GR00T post-training and G129 waist control; add Newton support for assemble trocar - #8771
Conversation
The assemble trocar update_stage reward term had weight 0. The reward manager skips weight-0 terms, so update_task_stage never ran: the task stage stayed at 0 and no stage reward or success termination was ever produced. update_task_stage returns zeros, so weight 1.0 runs it without changing the reward. The RLinf extension only registered embodiment_tag_id when the tag was missing from RLinf's registry. RLinf 0f9ea98 maps new_embodiment to projector 10, so the configured 31 was silently ignored and GR00T N1.5 checkpoints fine-tuned with new_embodiment = 31 decoded actions with an untrained projector. An explicitly configured ID now overrides the registered one; without a configured ID the registered ID is kept.
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (2). Other reviewed categories look good.
- PR description: The title and body match all nine changed files and provide before/after eight-environment outcome evidence; no description correction is needed.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: Implementation looks good.
- Style consistency: The expected configured override is logged as a warning, misclassifying routine status; use info logging and remove the duplicated override rationale.
- Test quality: Test quality looks good.
Minor fixes needed. Posted 2 inline findings.
Automated review; human maintainers own approval decisions.
| tag_id = 31 if configured_id is None else configured_id | ||
|
|
||
| # If tag is already in registry (native or previously added), skip | ||
| # If tag is already in registry (native or previously added), keep it unless the config |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Comment repeats docstring and block above
These lines restate the override rule from the docstring (129-131) and the projector-31 explanation from the comment block (136-144). Keep only the new fact: RLinf registers new_embodiment as 10.
| registered_id = embodiment_tags.EMBODIMENT_TAG_MAPPING[embodiment_tag] | ||
| if configured_id is not None and registered_id != configured_id: | ||
| embodiment_tags.EMBODIMENT_TAG_MAPPING[embodiment_tag] = configured_id | ||
| logger.warning( |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Expected override logged as warning
An explicitly configured embodiment_tag_id is applied as requested, so no caller action is needed. Per the logging guidance this is status, not a runtime warning; use logger.info.
[Medium impact] The changes reach GR00T post-training and G129 robot motion. Fix the missing stage rewards and last-step success check before merging. FindingsSummaryFixes GR00T post-training setup and restores the G129 waist’s asset-defined velocity limit.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Physics step] --> B[Check success and timeout]
B --> C[Compute rewards]
C --> D[Update task stage]
D --> E[Read stage for sparse rewards]
E --> F{Reset required?}
F -->|Yes| G[Clear task stage]
F -->|No| A
Reviews (1) · Last reviewed commit: "Fix G129 changelog fragment format" · Reviewed by Greptile |
| update_stage = RewTerm( | ||
| func=mdp.update_task_stage, | ||
| weight=0.0, | ||
| weight=1.0, |
There was a problem hiding this comment.
Enabling update_stage still leaves some completed stages without a reward. update_task_stage can advance from stage 1 directly to stage 3 when alignment and insertion both pass in one step. But trocar_insertion_reward requires prev_stage_insert == 2, so that transition earns no insertion reward, including on later steps. The other sparse rewards have the same problem when their preceding stage is skipped.
Check whether each completion threshold was crossed rather than requiring the previous stage to equal one specific value.
| update_stage = RewTerm( | ||
| func=mdp.update_task_stage, | ||
| weight=0.0, | ||
| weight=1.0, |
There was a problem hiding this comment.
update_stage now runs, but it still runs after the environment checks for success. ManagerBasedRLEnv.step computes terminations before rewards, so task_success_termination sees the previous stage. If placement first completes on the final allowed step, the timeout resets the stage before success can ever be reported.
Update the stage before checking terminations, while keeping it ahead of the reward terms.
AntoineRichard
left a comment
There was a problem hiding this comment.
The PR looks reasonable, my main concern is the change of the shared asset for PhysX. MujocoWarp ignores velocity_limits so it will be fine for it, but we may need to retrain some checkpoints. I think in general it's a good kick to re-evaluate our G1 assets.
| "waist": ImplicitActuatorCfg( | ||
| joint_names_expr=["waist_yaw_joint", "waist_roll_joint", "waist_pitch_joint"], | ||
| joint_effort_limit=1000.0, | ||
| joint_velocity_limit=0.0, |
There was a problem hiding this comment.
Is this unlocking the hip only for PhysX?
There was a problem hiding this comment.
I'm concerned this may impact our pre-trained policies @ooctipus @Double7sBurger
There was a problem hiding this comment.
This asset is not used by any of the Velocity tasks so I think it's fine
- Expand PhysX merged-mesh colliders onto child meshes for Newton. - Bake negative mesh collider scales into points for Newton. - Add physics presets (PhysX default, Newton MJWarp) to G129 trocar env. - Resolve G1 joints by name since joint order differs per backend. - Forward Hydra-style env overrides through RLinf train/play CLI.
- Document physics=newton_mjwarp and KEY=VALUE env overrides. - Add changelog fragments for the Newton support changes. - Test RLinf env override parsing and forwarding.
Thanks @AntoineRichard for review. I've also added Newton support for this task. I'm validating Newton training on 8×H100 on our cluster and will update here once I have results. Thank you. |
…-rlinf-stage-embodiment # Conflicts: # source/isaaclab_newton/isaaclab_newton/cloner/replicate.py # source/isaaclab_tasks/isaaclab_tasks/contrib/assemble_trocar/g129_dex3_env_cfg.py
Multi-GPU RLinf training starts one Isaac Sim per GPU. Without multi_gpu=False each renderer enumerates every GPU on the node through Vulkan and the concurrent workers crash in omni.kit.renderer at startup.
…embodiment' into mingxueg/fix-trocar-rlinf-stage-embodiment
|
@mingxueg-nv is this ready to go? :) |
Hi, @AntoineRichard , I think it's ready, now PhysX and Newton can now be trained and evaluated as independent backends in the assemble trocar task. |
On Newton, MuJoCo's soft contacts let the closed left fingers sink 2-3 mm into trocar_2 and hook it, so opening the thumb no longer frees the hand and the placement stage fails. A Newton-only startup event sets solref (0.01, 1.0) on the hand and trocar_2 colliders, which limits the penetration without changing friction or contact priority. PhysX is unaffected.
Use the shared preset CLI parser like the other RL backends instead of a custom positional argument, intermixed parsing, and override helper.
|
run-ci |
|
run-ci |
Description
This fixes two regressions affecting GR00T N1.5 RL post-training for the G129 Dex3 assemble-trocar task.
RLinf 0.3 compatibility after the integration update
new_embodimentas projector 10, while the GR00T N1.5 checkpoint uses projector 31. Honor an explicitly configuredembodiment_tag_idinstead of keeping the incompatible pre-registered value.RewardManagerskips weight-zero terms entirely. Its function still returns zero, so this does not alter the reward value.uvand install the build dependencies for the documented flash-attn source build.G129 arm-motion regression from the actuator limit migration
velocity_limit=0.0tojoint_velocity_limit=0.0.velocity_limit=0.0, but the new field writes a hard zero-velocity limit to PhysX. This produced alternating arm velocity/torque responses and made the arms move too slowly to complete the task.PhysX and Newton support for the assemble-trocar task
physics=newton_mjwarptoisaaclab train/play --rl_library rlinfto run on Newton. Other trailingKEY=VALUEenv overrides are forwarded the same way.settings are unchanged; Newton is selected with
physics=newton_mjwarp, and theNewton-specific settings apply only when Newton is selected. With the current Newton settings, we restarted PPO post-training from the SFT checkpoint with
success_stage=3(insertion) on 16 GPUs and trained for about 120 stepsThe training success rate rises steadily from 20.3% at the first step to about 67% (5-step
moving average) after 122 steps.
Videos
PhysX Before Fix — zero waist velocity limit, 0/8 success
PhysX After Fix — zero waist velocity limit removed, 4/8 success
Make Newton behaviour normal as PhysX by SFT model
Type of change
Checklist
pre-commitchecks withuv run isaaclab --formatCONTRIBUTORS.md