Skip to content

locomotion-rough-ground-rl#142

Merged
wilsonchenghy merged 1 commit into
mainfrom
locomotion-rough-ground-rl
Jul 17, 2026
Merged

locomotion-rough-ground-rl#142
wilsonchenghy merged 1 commit into
mainfrom
locomotion-rough-ground-rl

Conversation

@wilsonchenghy

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 17, 2026 02:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Wato humanoid locomotion RL setup for rough-ground training, aligning key command ranges and stabilizing training while sharing reward shaping across flat/rough configs.

Changes:

  • Adds shared anti leg-crossing reward term and introduces a rough-specific fall termination (base_tilt) in the rough locomotion config.
  • Adjusts rough-terrain training parameters (feet air-time reward strength, termination penalty, velocity command ranges) and mirrors training command ranges in PLAY config.
  • Updates PPO runner configuration for rough locomotion (empirical normalization, std parameterization, entropy tweak) and refreshes session progress documentation.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
autonomy/simulation/Humanoid_Wato/HumanoidRL/HumanoidRLPackage/rsl_rl_scripts/train.py Minor formatting-only change near helper definition spacing.
autonomy/simulation/Humanoid_Wato/HumanoidRL/HumanoidRLPackage/HumanoidRLSetup/tasks/locomotion/SESSION_PROGRESS_2026-07-13.md Adds detailed session notes documenting tuning decisions and outcomes.
autonomy/simulation/Humanoid_Wato/HumanoidRL/HumanoidRLPackage/HumanoidRLSetup/tasks/locomotion/config/wato_humanoid_v1/rough_env_cfg.py Adds shared reward term(s), introduces rough-specific termination, and updates rough env tuning parameters and PLAY ranges.
autonomy/simulation/Humanoid_Wato/HumanoidRL/HumanoidRLPackage/HumanoidRLSetup/tasks/locomotion/config/wato_humanoid_v1/flat_env_cfg.py Removes flat-only duplicate reward term implementation and disables rough-only reward that depends on removed sensors.
autonomy/simulation/Humanoid_Wato/HumanoidRL/HumanoidRLPackage/HumanoidRLSetup/tasks/locomotion/config/wato_humanoid_v1/agents/rsl_rl_ppo_cfg.py Updates PPO runner settings for rough training stability and exploration behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

torch.backends.cudnn.benchmark = False



Comment on lines +88 to +92
base_height_l2 = RewTerm(
func=mdp.base_height_l2,
weight=-5.0,
params={"target_height": 0.75, "sensor_cfg": SceneEntityCfg("height_scanner")},
)
Comment on lines 22 to 39
policy = RslRlPpoActorCriticCfg(
init_noise_std=1.0,
actor_hidden_dims=[512, 256, 128],
critic_hidden_dims=[512, 256, 128],
activation="elu",
# Root cause of the recurring "RuntimeError: normal expects all elements of
# std >= 0.0" crash (confirmed via torch.autograd.set_detect_anomaly + cross-
# referenced against rsl_rl's own upstream GitHub issue #33): with the default
# noise_std_type="scalar", the policy's std is a raw nn.Parameter with no
# lower bound -- the optimizer can push it negative or to NaN directly, or an
# out-of-distribution observation (e.g. mid-fall on rough terrain) can drive
# the PPO ratio's exp() to overflow, both of which crash torch.normal().
# rsl_rl's own maintainers added "log" mode as the structural fix: std is
# stored as log(std) and exponentiated, so it's mathematically guaranteed
# positive no matter what the optimizer does to the underlying parameter.
# We were already on rsl-rl-lib 3.1.2 (which has this), just never set it.
noise_std_type="log",
)
@wilsonchenghy
wilsonchenghy merged commit fd1d77c into main Jul 17, 2026
3 checks passed
@wilsonchenghy
wilsonchenghy deleted the locomotion-rough-ground-rl branch July 17, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants