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

Adds velocity_limit_sim and effort_limit_sim to actuator #1654

Merged
merged 10 commits into from
Feb 15, 2025

Conversation

jtigue-bdai
Copy link
Collaborator

@jtigue-bdai jtigue-bdai commented Jan 9, 2025

Description

This PR follows up on Issue 1384 and PR 1509 by seperating actuator limits for calculating computed torques from physics solver limits.

Fixes # (#1384)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Screenshots

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

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

@jtigue-bdai jtigue-bdai self-assigned this Jan 9, 2025
@jtigue-bdai jtigue-bdai marked this pull request as ready for review January 9, 2025 18:00
@zoctipus
Copy link
Contributor

zoctipus commented Feb 12, 2025

I like this! and enjoyed the insightful discussion in PR1509

I think previous commit that write the velocity limit in actuator cfg to simulation-level velocity limit broke some of my quadrupet training, and I only figured it out because of the commit before that one worked.
I hot fixed it by setting the velocity limit to the value 2* more than factory recommendation for sim to work, but after this fix I can change back the velocity limit back to normal value!

Copy link
Collaborator

@renezurbruegg renezurbruegg left a comment

Choose a reason for hiding this comment

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

Nice, Thank you!
I think this fix/feature is much needed.

@jtigue-bdai jtigue-bdai force-pushed the jat/fix/velocity_limit_sim branch from c7fef1e to b08422e Compare February 12, 2025 17:35
Co-authored-by: Pascal Roth <[email protected]>
Signed-off-by: James Tigue <[email protected]>
Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

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

Some smaller comments, otherwise LGTM, lets get this merged soon

@Mayankm96 Mayankm96 added the bug Something isn't working label Feb 12, 2025
@kellyguo11 kellyguo11 changed the title Add velocity_limit_sim and effort_limit_sim to actuator Adds velocity_limit_sim and effort_limit_sim to actuator Feb 14, 2025
Copy link
Collaborator

@pascal-roth pascal-roth left a comment

Choose a reason for hiding this comment

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

Important fix, LGTM, lets get it merged

@kellyguo11 kellyguo11 merged commit 4c4377d into main Feb 15, 2025
4 of 5 checks passed
@kellyguo11 kellyguo11 deleted the jat/fix/velocity_limit_sim branch February 15, 2025 06:17
Mayankm96 added a commit that referenced this pull request Mar 2, 2025
…1873)

# Description

The previous fix in #1654 was checking if `effort_limits_sim` is None
instead of checking `cfg.effort_limits_sim` for explicit actuators. This
did NOT work as effort limits sim is a tensor that gets assigned the
value on initialization.

The new fix now adds an implicit/explicit model attribute to the
actuator model to ensure the right defaults are getting set. It moves
all the implicit actuator warning code to its class to keep the
articulation class cleaner.

We also revert the behavior of setting velocity limits for implicit
actuators to the state before #1509. Before that change, the parameter
`velocity_limit` was set in the configurations but not getting passed
through. The MR #1509 allowed these values to be set which caused many
of the assets to not train anymore or behave differently between
IsaacLab versions. We now revert this behavior with a warning. If users
want to set the limits, they should use the `effort_limit_sim` and
`velocity_limit_sim` quantities.

Fixes #1837

## Type of change

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

## Screenshot

The training of Allegro hand environment:
* Green: The current main at 6a415df
* Black: This MR
* Orange: Commenting out the setting of `write_joint_velocity_to_sim`
which was introduced in #1509.


![image](https://github.com/user-attachments/assets/8ca1ded2-7d8f-4123-aea8-9082559885d7)


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] 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
- [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: Mayank Mittal <[email protected]>
Co-authored-by: James Tigue <[email protected]>
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

Successfully merging this pull request may close these issues.

6 participants