-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 issue where the indices were not created correctly. #1660
Fixes issue where the indices were not created correctly. #1660
Conversation
I'll update the test function for the articulation to catch this error. It's only checking when no indices are passed, and that's why it wasn't caught in the tests. |
Thanks for catching this. |
Thanks a lot for catching this and adding a fix for it! Look forward to the unit test addition, please add it to the same PR here. |
…n to catch errors when indexes are passed but not assigned properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the fix
@@ -385,11 +385,14 @@ def write_root_com_pose_to_sim(self, root_pose: torch.Tensor, env_ids: Sequence[ | |||
env_ids: Environment indices. If None, then all indices are used. | |||
""" | |||
# resolve all indices | |||
physx_env_ids = env_ids | |||
if env_ids is None: | |||
local_env_ids = slice(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generating an unused variable warning, we should be able to remove this. Please also run the formatter ./isaaclab.sh -f
to verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, yes sorry. It's fixed now.
@@ -399,7 +402,7 @@ def write_root_com_pose_to_sim(self, root_pose: torch.Tensor, env_ids: Sequence[ | |||
) | |||
|
|||
root_link_pose = torch.cat((root_link_pos, root_link_quat), dim=-1) | |||
self.write_root_link_pose_to_sim(root_pose=root_link_pose, env_ids=env_ids) | |||
self.write_root_link_pose_to_sim(root_pose=root_link_pose, env_ids=physx_env_ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kellyguo11 but that variable is used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind I mis-read the line the previous comment was pointing to.
…ntoineRichard/IsaacLab into fix_articulation_com_link_env_id_issue
…1660) # Description This PR fixes an issue in articulation object from omni.isaac.lab. The functions `write_root_com_pose_to_sim` and `write_root_link_to_sim` both result in an error where a variable is called before being assigned. I checked and there is a test for this, but I'm not sure why they don't catch it... The two functions have been changed to match the behaviors of `write_root_link_pose_to_sim` and `write_root_com_velocity_to_sim`. Fixes isaac-sim#1659 ## 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 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 --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
# Description This PR fixes an issue in articulation object from omni.isaac.lab. The functions `write_root_com_pose_to_sim` and `write_root_link_to_sim` both result in an error where a variable is called before being assigned. I checked and there is a test for this, but I'm not sure why they don't catch it... The two functions have been changed to match the behaviors of `write_root_link_pose_to_sim` and `write_root_com_velocity_to_sim`. Fixes #1659 ## 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 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 --------- Co-authored-by: Kelly Guo <kellyg@nvidia.com>
Description
This PR fixes an issue in articulation object from omni.isaac.lab. The functions
write_root_com_pose_to_sim
andwrite_root_link_to_sim
both result in an error where a variable is called before being assigned. I checked and there is a test for this, but I'm not sure why they don't catch it...The two functions have been changed to match the behaviors of
write_root_link_pose_to_sim
andwrite_root_com_velocity_to_sim
.Fixes #1659
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there