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

[Bug Report] Anymal envs cannot run with physics material randomization #276

Closed
2 of 3 tasks
vassil-atn opened this issue Mar 8, 2024 · 2 comments
Closed
2 of 3 tasks
Assignees
Labels
bug Something isn't working

Comments

@vassil-atn
Copy link

Describe the bug

Training the Anymal environments crashes when using randomising the physics material.

Steps to reproduce

Running any training script on the flat or rough anymal envs. For example:

./orbit.sh -p source/standalone/workflows/rsl_rl/train.py --task Isaac-Velocity-Flat-Anymal-C-v0 --headless

Error Log:

2024-03-08 15:59:39 [84,519ms] [Error] [__main__] Traceback (most recent call last):
  File "/home/user/miniconda3/envs/my_env/lib/python3.10/site-packages/gymnasium/envs/registration.py", line 802, in make
    env = env_creator(**env_spec_kwargs)
  File "/home/user/test/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/rl_task_env.py", line 99, in __init__
    self.randomization_manager.randomize(mode="startup")
  File "/home/user/test/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/managers/randomization_manager.py", line 160, in randomize
    term_cfg.func(self._env, env_ids, **term_cfg.params)
  File "/home/user/test/orbit/source/extensions/omni.isaac.orbit/omni/isaac/orbit/envs/mdp/randomizations.py", line 74, in randomize_rigid_body_material
    indices = torch.tensor(asset_cfg.body_ids, dtype=torch.int).repeat(len(env_ids), 1)
TypeError: 'slice' object cannot be interpreted as an integer


System Info

Describe the characteristic of your environment:

  • Commit: 93f3eff
  • Isaac Sim Version: 2023.1.1-rc.8+2023.1.688.573e0291.tc
  • OS: Ubuntu 20.04
  • GPU: RTX 3060
  • CUDA: 12.4
  • GPU Driver: 550.40.07

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

  • Allow physics materials to be randomized again.
@vassil-atn vassil-atn changed the title [Bug Report] [Bug Report] Anymal envs cannot run with physics material randomization Mar 8, 2024
@Mayankm96
Copy link
Contributor

Thanks for pointing this out. The fix is under review. Hope to have it merged soon. As a hot-fix, you can comment out these two lines of code:

https://github.com/NVIDIA-Omniverse/orbit/blob/main/source/extensions/omni.isaac.orbit/omni/isaac/orbit/managers/scene_entity_cfg.py#L140-L142

@Mayankm96 Mayankm96 self-assigned this Mar 9, 2024
@Mayankm96 Mayankm96 added the bug Something isn't working label Mar 9, 2024
@Mayankm96
Copy link
Contributor

This should be fixed now with e444df7

Thanks for reporting!

ADebor pushed a commit to ADebor/IsaacLab that referenced this issue Apr 8, 2024
# Description

This MR adds command manager terms so that it is possible to apply
multiple types of commands in the same environment. Before, you could
only use one. Now you can add multiple, for example, to generate a base
velocity command and an end effector pose command simultaneously.

## Type of change

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

## Checklist

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

---------

Signed-off-by: David Hoeller <dhoeller@ethz.ch>
Co-authored-by: Mayank Mittal <mittalma@leggedrobotics.com>
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this issue Aug 8, 2024
# Description

This MR adds command manager terms so that it is possible to apply
multiple types of commands in the same environment. Before, you could
only use one. Now you can add multiple, for example, to generate a base
velocity command and an end effector pose command simultaneously.

## Type of change

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

## Checklist

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

---------

Signed-off-by: David Hoeller <dhoeller@ethz.ch>
Co-authored-by: Mayank Mittal <mittalma@leggedrobotics.com>
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this issue Aug 8, 2024
…saac-sim#447)

# Description

With commit 2672664, the code stopped working. Somehow, the tests did not
catch the issue, but it shows up when you run the workflows. Anyway, this
MR makes the fix necessary to deal with slices.

Fixes isaac-sim#277 ,
isaac-sim#276

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have run all the tests with `./orbit.sh --test` and they pass
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants