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

Fixes orientation resampling logic in reset_root_state_uniform event #486

Merged
merged 14 commits into from
Jun 13, 2024

Conversation

zoctipus
Copy link
Contributor

@zoctipus zoctipus commented Jun 12, 2024

Description

fix 1:
original reset_root_state_uniform has bugs of two different logic for setting position and orientation:

positions = root_states[:, 0:3] + env.scene.env_origins[env_ids] + rand_samples[:, 0:3]
orientations = math_utils.quat_from_euler_xyz(rand_samples[:, 3], rand_samples[:, 4], rand_samples[:, 5])

where the position is set by adding input sample to the root states, but the orientation is set by input sample. User must be aware that the position range input is a relative value, while the orientation range input is absolute value

new reset_root_state_uniform made sure both position and orientation are relative:

positions = root_states[:, 0:3] + env.scene.env_origins[env_ids] + rand_samples[:, 0:3]
orientations_delta = math_utils.quat_from_euler_xyz(rand_samples[:, 3], rand_samples[:, 4], rand_samples[:, 5])
orientations = math_utils.quat_mul(root_states[:, 3:7], orientations_delta)

fix 2:
rename a comment that referenced omni.isaac.orbit to omni.isaac.lab in articulation module

Fixes # (issue)

No similar Issue found

Type of change

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

Screenshots

Please attach before and after screenshots of the change if applicable.

Screenshot from 2024-06-11 20-34-09

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 run all the tests with ./isaaclab.sh --test and they pass
  • 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

@Dhoeller19
Copy link
Contributor

@zoctipus, thanks a lot!
Minor comments and then looks good to me.

@Dhoeller19 Dhoeller19 changed the title Fix of orientation setting logic mismatch in function reset_root_state_uniform Fixes orientation resampling logic in reset_root_state_uniform event Jun 13, 2024
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
Signed-off-by: David Hoeller <dhoeller@nvidia.com>
@Dhoeller19 Dhoeller19 merged commit 478e914 into isaac-sim:main Jun 13, 2024
1 of 2 checks passed
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this pull request Aug 8, 2024
…ac-sim#486)

# Description

Cluster workflow did not work with the different profiles and introduced
names. This PR fixes the workflow and in addition, introduces additional
checks that the profile can be selected. In detail:

- checks whether a profile can be selected depending on whether a
`.env.$container_profile` exists
- allows for `job` to have multiple arguments, also without a profile,
for all other options, the second argument has to be the profile
- check if a docker image exists before building the singularity image
- check if the path for the singularity image exists on the cluster,
otherwise create it
- check if the path for orbit exists on the cluster, otherwise create it


## 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
- [ ] I have run all the tests with `./orbit.sh --test` and they pass
- [ ] 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

---------

Co-authored-by: Leul Tesfaye <lst26@cornell.edu>
Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
fatimaanes pushed a commit to fatimaanes/omniperf that referenced this pull request Aug 8, 2024
…saac-sim#486)

The event reset_root_state_uniform had two different logics for setting position and orientation:
```
positions = root_states[:, 0:3] + env.scene.env_origins[env_ids] + rand_samples[:, 0:3]
orientations = math_utils.quat_from_euler_xyz(rand_samples[:, 3], rand_samples[:, 4], rand_samples[:, 5])
```
where the position is set by adding the random samples to the default root states, but the orientation was set as an absolute value.

Both orientation and position are now relative offsets.

## 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
`./isaaclab.sh --format`
- [ ] 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
- [ ] I have run all the tests with `./isaaclab.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
iamdrfly pushed a commit to iamdrfly/IsaacLab that referenced this pull request Nov 21, 2024
…ac-sim#486)

# Description

Cluster workflow did not work with the different profiles and introduced
names. This PR fixes the workflow and in addition, introduces additional
checks that the profile can be selected. In detail:

- checks whether a profile can be selected depending on whether a
`.env.$container_profile` exists
- allows for `job` to have multiple arguments, also without a profile,
for all other options, the second argument has to be the profile
- check if a docker image exists before building the singularity image
- check if the path for the singularity image exists on the cluster,
otherwise create it
- check if the path for orbit exists on the cluster, otherwise create it


## 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
- [ ] I have run all the tests with `./orbit.sh --test` and they pass
- [ ] 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

---------

Co-authored-by: Leul Tesfaye <lst26@cornell.edu>
Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
iamdrfly pushed a commit to iamdrfly/IsaacLab that referenced this pull request Nov 21, 2024
…saac-sim#486)

The event reset_root_state_uniform had two different logics for setting position and orientation:
```
positions = root_states[:, 0:3] + env.scene.env_origins[env_ids] + rand_samples[:, 0:3]
orientations = math_utils.quat_from_euler_xyz(rand_samples[:, 3], rand_samples[:, 4], rand_samples[:, 5])
```
where the position is set by adding the random samples to the default root states, but the orientation was set as an absolute value.

Both orientation and position are now relative offsets.

## 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
`./isaaclab.sh --format`
- [ ] 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
- [ ] I have run all the tests with `./isaaclab.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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants