Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add digit locomotion examples #1892

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add digit locomotion examples #1892

wants to merge 8 commits into from

Conversation

lgulich
Copy link
Contributor

@lgulich lgulich commented Feb 17, 2025

Description

Add an example to train a locomotion and loco-manipulation controller for digit. This also serves as an example on how to train a robot with closed loops.

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

This commit introduces comprehensive configuration files for the Agility Digit robot in locomotion environments, including:

- Robot articulation configuration in `agility.py`
- Rough terrain locomotion environment configuration
- Locomotion and manipulation environment configurations
- Reward and observation definitions
- PPO agent configurations for different scenarios (rough terrain, flat ground, locomotion-manipulation)

The new configurations support various locomotion tasks with the Digit robot, including velocity tracking, terrain navigation, and manipulation scenarios.
This commit refines the Digit robot configuration for flat ground locomotion:

- Modified registration to use a new `DigitFlatPPORunnerCfg`
- Updated flat environment configuration to remove height scanner and terrain curriculum
- Replaced custom feet air time reward with a standard biped air time reward
- Adjusted reward weights and policy network architecture for flat ground scenario
@lgulich lgulich changed the title Lgulich/digit locomotion Add digit locomotion examples Feb 17, 2025
…velocity/config/digit/__init__.py

Signed-off-by: lgulich <[email protected]>
…velocity/config/digit/agents/rsl_rl_ppo_cfg.py

Signed-off-by: lgulich <[email protected]>
return torch.sum(torch.abs(offset), dim=1) * (torch.norm(command[:, :2], dim=1) < 0.06)


def no_jumps(env, sensor_cfg: SceneEntityCfg) -> torch.Tensor:
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have a MDP term called: undesired_contacts which does the same operation?

https://isaac-sim.github.io/IsaacLab/main/source/api/lab/isaaclab.envs.mdp.html#isaaclab.envs.mdp.rewards.undesired_contacts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

isn't this the opposite? The no_jumps reward should encourage that at least 1 foot is on the floor. The undesired_contacts reward would encourage that no foot is on the floor, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah okay. Then I'd say we should make another term in the mdp.rewards called desired_contacts? That might be useful for some other tasks in the future too

@Mayankm96
Copy link
Contributor

Added a few comments. Would be good to also supplement the docs with images from each task :)

@lgulich lgulich force-pushed the lgulich/digit-locomotion branch from 3159e03 to d6554c5 Compare February 18, 2025 12:17
Copy link
Contributor Author

@lgulich lgulich left a comment

Choose a reason for hiding this comment

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

Thanks for the review. Addressed your comments @Mayankm96 but still have to add images to the docs.

return torch.sum(torch.abs(offset), dim=1) * (torch.norm(command[:, :2], dim=1) < 0.06)


def no_jumps(env, sensor_cfg: SceneEntityCfg) -> torch.Tensor:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

isn't this the opposite? The no_jumps reward should encourage that at least 1 foot is on the floor. The undesired_contacts reward would encourage that no foot is on the floor, no?

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