Skip to content

Add SuperMimic agents for G1 velocity tracking on flat and rough terrain - #9173

Draft
lgulich wants to merge 33 commits into
isaac-sim:mainfrom
lgulich:lgulich/g1-velocity-supermimic
Draft

lgulich wants to merge 33 commits into
isaac-sim:mainfrom
lgulich:lgulich/g1-velocity-supermimic

Conversation

@lgulich

@lgulich lgulich commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The G1 velocity-tracking tasks train with PPO. This adds SuperMimic agents for Isaac-Velocity-Flat-G1 and Isaac-Velocity-Rough-G1, with two entry points each: rsl_rl_supermimic_cfg_entry_point with the official SuperMimic settings and rsl_rl_blinkmimic_cfg_entry_point with the BlinkMimic recipe (arXiv 2611.16422). Rewards, terminations, commands, events and the PPO agents are unchanged.

Rough terrain needs the policy's height scan in imagined rollouts, where there is no simulator to cast rays. The task ray-casts the terrain mesh once on the GPU into a heightfield (combined with any ground planes) and samples it at the predicted pose, the same way the height scanner computes its readings. The world model also receives the robot's and feet's clearance above that terrain. Lookups are differentiable in x and y and run inside CUDA graphs.

The articulation kinematics from the motion tracking task now compute a chosen set of bodies, which the velocity G1 with its fixed head and palm joints needs. The BlinkMimic agents mirror world-model batches through a G1 left/right mirror of the velocity state. That mirror negates the elbow roll joints, whose sign the shared G1 name rule gets wrong; forward kinematics confirm the corrected mirror, and the PPO symmetry itself is unchanged.

The actor receives the velocity command inside each observation frame, as in PPO's policy group, rather than through SuperMimic's separate goal encoder. With the encoder, most flat runs collapsed early: the tanh latent saturated to one value for every command and the policy ran a fixed gait regardless of it. leggedrobotics/rsl_rl#255 now also normalizes the goal encoder, which prevents that collapse on its own.

Tests compare the actor inputs, every reward term and the terminations against the env's managers on flat and rough terrain, the height scan against the real sensor, and check that the mirror is its own inverse and that graphed learning works with mirrored batches. The imagined joint-acceleration penalty is a policy-rate approximation and follows the env's term only loosely; the other terms match closely.

On 3 seeds of 60 minutes each on one L40S, the BlinkMimic agent reached PPO's best reward on rough terrain in about 4 minutes against PPO's 48, with lower velocity errors at the same terrain level. With the goal-encoder guard, all six flat SuperMimic and BlinkMimic seeds tracked the command with 0.04 to 0.07 m/s linear velocity error, against 0.10 m/s for PPO. Curves and videos: https://linkify.nvidia.com/s/rsl-rl-ppo-supermimic-motion-tracking/ (NVIDIA internal; its flat section predates the fix).

Stacked on #9151, so the diff includes #8867 and #9151 until they merge; the velocity changes alone: lgulich/IsaacLab@6579a70...lgulich/g1-velocity-supermimic. It needs an rsl-rl-lib release with leggedrobotics/rsl_rl#255, and the SuperMimic velocity task requires the Newton backend.

To train it:

uv run isaaclab train --rl_library rsl_rl --task Isaac-Velocity-Rough-G1 \
    --agent rsl_rl_blinkmimic_cfg_entry_point presets=state_obs physics=newton_mjwarp

and to run the tests:

./isaaclab.sh -p -m pytest source/isaaclab_tasks/test/core/test_velocity_supermimic.py

🤖 Generated with Claude Code

rafaelcathomen and others added 16 commits November 21, 2026 16:16
RSL-RL aligned SuperMimic's parameter names with SAC and PPO and added
CUDA graph capture. The replay capacity key also has to match, since
RSL-RL consumes it while building the replay buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Per-term joint and body indices are device tensors built once, and
products over feet and contact bodies multiply explicitly, since the
backward of prod synchronizes with the host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The velocity task's heads now run inside captured graphs, and graphed
learner iterations match eager ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The every-step extras key is now cleared beside the final_obs key it
pairs with in reset and reset_to. The physical observation groups rely
on the group default for corruption, the velocity task resolves its
contact sensor name once, and the docs and docstrings drop references to
the parity test and to G1 being the first consumer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The typed SuperMimic configurations covered only part of the RSL-RL
constructor options, so the constructor-tracking test failed against
the current SuperMimic. Add the remaining actor, world-model and
algorithm options: the BlinkMimic settings (reference-action actor,
mirrored world-model batches, Muon and the actor learning-rate
multiplier with its decay triggers), the reference recipe's schedule,
replay-window and critic switches, and the actor and world-model
network options. The environment's maximum episode length is injected
by construct_algorithm.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
rafaelcathomen and others added 10 commits November 24, 2026 09:00
The use_cuda_graph docstring named only learner iterations, while RSL-RL
also captures the collection calls act and process_env_step. It now says
so, and notes that Python values read inside the captured calls, such as
the reward weights the differentiable velocity task reads from the
reward manager, are fixed at capture time.

Signed-off-by: Rafael Cathomen <[email protected]>
RSL-RL's SuperMimic now passes the applied policy actions and the
privileged context to post_dynamics, and the actor observation history
to critic_obs, for tasks whose analytic state or critic depends on
them. The differentiable velocity task needs neither: its contact
clocks advance from the predicted contact events alone and its critic
keeps its privileged inputs. It accepts the new arguments so that the
learner can call it.

Signed-off-by: Rafael Cathomen <[email protected]>
Isaac-Motion-Tracking-G1 gets an rsl_rl_supermimic_cfg_entry_point agent
that trains with RSL-RL's SuperMimic. The task's rewards, terminations,
commands and events are unchanged and shared with the PPO agent; an
opt-in state_obs preset adds the physical state, goal, context and label
groups SuperMimic reads.

MotionTrackingTask provides the world-model state (root pose and
velocities, joint positions and velocities), forward kinematics from the
Newton model, the nine reward terms and soft versions of the
terminations. The kinematics and tracking objectives follow Octi's G1
tracking work. Tests check the kinematics against simulated body poses
and every reward and termination against the env's managers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The G1 agent uses BlinkMimic's sizes and settings: Muon, a raised actor
learning rate with a decay start, a policy that corrects the task's
reference action, and mirrored world-model batches. The motion tracking
task provides the reference joint targets, and the G1 task mirrors
states, actions, body masses and self-collision labels across the
sagittal plane. Its forward kinematics run per tree depth instead of
per joint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The physical observation groups rely on the group default for
corruption, the G1 agent leaves the warm-up steps and actor learning-rate
decay length at their defaults, and the task looks up its action term
once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RSL-RL's SuperMimic now passes the actor observation history to
DifferentiableTask.critic_obs as a fifth argument (rsl_rl#255). The
motion-tracking critic does not use it. The parameter defaults to None, so
the task works with RSL-RL revisions from before and after that change.

Signed-off-by: Rafael Cathomen <[email protected]>
The velocity task needs the feet and the height scanner mount of a G1
whose articulation also has fixed joints, e.g. at the head and palms.
ArticulationKinematics takes an optional list of body names, computes
only those bodies and their ancestors, and returns them in that order.
Only the joints on those chains must be revolute.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The official SuperMimic code updates the policy from the first learner
iteration and collects without action noise. The flat G1 agent now does
the same and runs its learner matrix products in BF16.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
lgulich and others added 7 commits November 24, 2026 21:50
Isaac-Velocity-Rough-G1 gets an rsl_rl_supermimic_cfg_entry_point agent
on the PPO agent's rewards, terminations and policy observations. Its
actor frames hold the policy group's terms without the command,
including the 187-ray height scan, so a deployed policy reads the same
inputs as the PPO one.

The differentiable velocity task samples that scan from a heightfield
ray-cast once on a 2.5 cm grid from the terrain mesh of the Newton model,
at the yaw-rotated ray starts of the scanner body. Forward kinematics
gives the scanner and feet, so the scan follows the imagined root pose
and joints, and the sliding penalty reads foot velocities from it
instead of the state. The world model sees the terrain through the root
and sole-corner heights above it; the state holds the world root
position, which only these terrain lookups read.

The scan matches the ray-cast one except within one grid cell of
vertical steps. Rewards and terminations need no rough-specific terms:
the rough env shares the flat env's reward functions and its torso
contact termination. Tests compare actor inputs, every reward term and
the termination with the managers on both terrains and bound the scan
error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
rsl_rl_blinkmimic_cfg_entry_point trains the flat and rough G1 velocity
tasks with BlinkMimic's settings: Muon on the actor and world model, a
four times higher actor learning rate that decays after 1400 learner
iterations, mirrored world-model batches, a 3x1024 world model, five
world-model updates and 2048 policy starts per learner iteration, a
learning rate of 4e-4 and a deployment actor average.

G1VelocityTask mirrors states, actions, body masses and contact labels
with the G1 joint, action and body maps. A mirrored robot must also see
mirrored terrain, so states are reflected about the upper y edge of the
heightfield, beyond which lookups return the terrain reflected. Tests
check that each mirror is an involution, that mirrored feet and sole
clearances match their counterparts, and that the agents capture
collection and learner iterations in CUDA graphs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The flat G1 task in play mode has both a ground plane and a terrain mesh,
which failed construction. The ground is now the higher of the two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Flat G1 SuperMimic runs plateaued at a command-blind gait. Under every
command, the stuck checkpoints walk forward at 0.45 m/s while turning at
-0.7 rad/s. In each of them the actor's tanh goal encoder had saturated
within the first few hundred learner iterations, so its latent was the
same for every command and no gradient reached the encoder again. Runs
whose latent still varied with the command, including the rough runs
that tracked well, did not plateau.

Each actor frame now holds the default policy observation including the
command, as the PPO policy does, and the actor has no separate goal
input. Exported policies take the command in their observation history.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The shared G1 symmetry resolves joint signs by name and gives every
elbow joint the sign of a pitch joint, so the mirror kept the sign of
the elbow roll joints of the velocity-task G1. These joints rotate about
the forward axis: forward kinematics of mirrored states put the elbow
roll links up to 0.13 in quaternion distance and 4.7 rad/s in angular
velocity away from their reflected counterparts. The SuperMimic mirror
now negates them; the PPO symmetry map is unchanged. The simulation
test checks the reflected elbow roll links.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ClemensSchwarke
ClemensSchwarke force-pushed the lgulich/g1-velocity-supermimic branch from ca15d0f to c17f051 Compare November 24, 2026 21:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants