Skip to content

Add minimal rough environment - #109

Open
OscarMrZ wants to merge 28 commits into
mainfrom
add/rough_env_simple
Open

Add minimal rough environment#109
OscarMrZ wants to merge 28 commits into
mainfrom
add/rough_env_simple

Conversation

@OscarMrZ

@OscarMrZ OscarMrZ commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Cleans up #89 to only add the absolutely necessary terms.

OscarMrZ and others added 21 commits July 14, 2026 17:26
Allows to configure a minimal magnitude per axis, so very small
velocities are not over represented. Additionally, forward envs are
replaced by straight envs, same logic but both directions
- Fixed gate logic overrepressenting the band edges. Actual resample now
- Separate low vel vs normal band
- Ability to configure probability of being inside the low/high vel
bands
- Renamed to DualBandVelocityCommand
Replaces the default with all kinds of terrains with the tested pebbles,
random spread and stairs curriculum + adapted rewards better suited for
rough low vel
Also change the order of envs so they are group by type
Needed to avoid slight penetration (only visible when using actual
geometries as ground) with some feet configurations
Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
@OscarMrZ
OscarMrZ marked this pull request as draft September 7, 2026 14:12
OscarMrZ and others added 2 commits September 7, 2026 17:09
@OscarMrZ
OscarMrZ force-pushed the add/rough_env_simple branch from 07523b6 to 605b8f8 Compare September 7, 2026 15:09
@OscarMrZ
OscarMrZ requested a review from saikishor September 7, 2026 15:23
@OscarMrZ
OscarMrZ marked this pull request as ready for review September 7, 2026 15:23
Comment on lines 61 to 82
task_id="Mjlab-Velocity-Rough-Pal-Kangaroo-Lower-Body",
env_cfg=pal_kangaroo_lower_body_rough_env_cfg(),
play_env_cfg=pal_kangaroo_lower_body_rough_env_cfg(play=True),
rl_cfg=pal_kangaroo_ppo_runner_cfg(),
runner_cls=VelocityOnPolicyRunner,
)

register_mjlab_task(
task_id="Mjlab-Velocity-Rough-Pal-Kangaroo-Hands",
env_cfg=pal_kangaroo_hands_rough_env_cfg(),
play_env_cfg=pal_kangaroo_hands_rough_env_cfg(play=True),
rl_cfg=pal_kangaroo_ppo_runner_cfg(),
runner_cls=VelocityOnPolicyRunner,
)

register_mjlab_task(
task_id="Mjlab-Velocity-Rough-Pal-Kangaroo-Grippers",
env_cfg=pal_kangaroo_grippers_rough_env_cfg(),
play_env_cfg=pal_kangaroo_grippers_rough_env_cfg(play=True),
rl_cfg=pal_kangaroo_ppo_runner_cfg(),
runner_cls=VelocityOnPolicyRunner,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shall we comment them out, until we figure something out for the 4DoF variant

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, I think that would be better

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy that

Comment thread src/pal_mjlab/tasks/velocity/kangaroo/env_cfgs.py Outdated
Comment on lines +442 to +443
"x": (-0.05, 0.05),
"y": (-0.05, 0.05),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That small, can't we increase it o 20 cms?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it was a leftover from earlier experiments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Understood boss

OscarMrZ and others added 2 commits September 8, 2026 15:49
Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
@OscarMrZ

OscarMrZ commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

I have applied your suggestions @saikishor, with two additional changes:

  • Reduced roughly to half the command velocities, as I think it's easier for the policy to learn low speed rough terrain traversal. I'd say let's first have this and then we can introduce a velocity ramp up at the proper steps.
  • I have increased tracking stds a little bit (to sqrt(0.1)) so the gradient stays informative and doesn't collapse at max possible errors. Now even with 0 tracking, any improvement will farm rewards.

Now with std = sqrt(0.1)

image

Before with std = sqrt(0.0225)

image

@saikishor

Copy link
Copy Markdown
Member
  • Reduced roughly to half the command velocities, as I think it's easier for the policy to learn low speed rough terrain traversal. I'd say let's first have this and then we can introduce a velocity ramp up at the proper steps.

Double agreed

  • I have increased tracking stds a little bit (to sqrt(0.1)) so the gradient stays informative and doesn't collapse at max possible errors. Now even with 0 tracking, any improvement will farm rewards.

I think it is a wise choice

@saikishor saikishor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rest LGTM. Please also update the release notes.

Thank you

Comment on lines +7 to 13
# pal_kangaroo_grippers_rough_env_cfg,
pal_kangaroo_hands_flat_env_cfg,
pal_kangaroo_hands_rough_env_cfg,
# pal_kangaroo_hands_rough_env_cfg,
pal_kangaroo_lower_body_flat_env_cfg,
pal_kangaroo_lower_body_rough_env_cfg,
pal_kangaroo_rough_env_cfg,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# pal_kangaroo_grippers_rough_env_cfg,
pal_kangaroo_hands_flat_env_cfg,
pal_kangaroo_hands_rough_env_cfg,
# pal_kangaroo_hands_rough_env_cfg,
pal_kangaroo_lower_body_flat_env_cfg,
pal_kangaroo_lower_body_rough_env_cfg,
pal_kangaroo_rough_env_cfg,
)
pal_kangaroo_hands_flat_env_cfg,
pal_kangaroo_lower_body_flat_env_cfg,
pal_kangaroo_rough_env_cfg,
pal_kangaroo_lower_body_rough_env_cfg,
# pal_kangaroo_grippers_rough_env_cfg,
# pal_kangaroo_hands_rough_env_cfg,
)

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