Skip to content

Fixes DCMotor clipping for negative power and adds actuator tests #2300

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

Merged
merged 56 commits into from
Jul 23, 2025

Conversation

jtigue-bdai
Copy link
Collaborator

@jtigue-bdai jtigue-bdai commented Apr 11, 2025

Description

This PR adds tests for actuator initialization, configuration, and computation for Implicit, IdealPD, and DC motor actuators.

This PR also updates the DCMotor model to clip based on a four quadrant DC motor model. This will fix improper clipping in the negative power regions (i.e. positive torque and negative velocity or negative torque and positive velocity).

NOTE: This PR is dependant on the pytest migration in: 2034
This PR includes changes made in 2291 and would be an alternate candidate.

Fixes #2139

Type of change

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

Screenshots

image

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 changed the title Fix DCMotor clipping for negative power and add actuator tests Fixes DCMotor clipping for negative power and adds actuator tests Apr 11, 2025
@kellyguo11
Copy link
Contributor

hmm looks like the DC motor and environment tests are both failing, along with a few others, but not sure if they are all related to this change

@jtigue-bdai
Copy link
Collaborator Author

jtigue-bdai commented May 16, 2025

hmm looks like the DC motor and environment tests are both failing, along with a few others, but not sure if they are all related to this change

It seems there is something happening with the ActuatorNetLSTM actuators in AnymalC that is producing nan values. Will continue investigating.

@Mayankm96 anything about this spark ideas?

@Mayankm96
Copy link
Contributor

@jtigue-bdai Do you have any references for the negative power?

@@ -133,8 +148,7 @@ Fixed

Changed
^^^^^^^

* Updated gymnasium to v1.2.0. This update includes fixes for a memory leak that appears when recording
>>>* Updated gymnasium to v1.2.0. This update includes fixes for a memory leak that appears when recording
Copy link
Contributor

Choose a reason for hiding this comment

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

merge error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup

)


# @pytest.mark.parametrize("num_envs", [1, 2])
Copy link
Contributor

Choose a reason for hiding this comment

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

could these be removed or reused?

@kellyguo11 kellyguo11 merged commit 24a78b6 into isaac-sim:main Jul 23, 2025
4 of 5 checks passed
zuxinrui pushed a commit to zuxinrui/IsaacLab that referenced this pull request Jul 29, 2025
…aac-sim#2300)

# Description

This PR adds tests for actuator initialization, configuration, and
computation for Implicit, IdealPD, and DC motor actuators.

This PR also updates the DCMotor model to clip based on a four quadrant
DC motor model. This will fix improper clipping in the negative power
regions (i.e. positive torque and negative velocity or negative torque
and positive velocity).

NOTE: This PR is dependant on the pytest migration in:
[2034](isaac-sim#2034)
This PR includes changes made in
[2291](isaac-sim#2291) and would be an
alternate candidate.

Fixes [isaac-sim#2139](isaac-sim#2139)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

## Screenshots


![image](https://github.com/user-attachments/assets/c94f877e-b3a9-441a-ad2e-ec6124cc64de)

## 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
- [x] My changes generate no new warnings
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: James Tigue <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
harry-wf-cheung pushed a commit to harry-wf-cheung/IsaacLab-Harry that referenced this pull request Jul 30, 2025
…aac-sim#2300)

# Description

This PR adds tests for actuator initialization, configuration, and
computation for Implicit, IdealPD, and DC motor actuators.

This PR also updates the DCMotor model to clip based on a four quadrant
DC motor model. This will fix improper clipping in the negative power
regions (i.e. positive torque and negative velocity or negative torque
and positive velocity).

NOTE: This PR is dependant on the pytest migration in:
[2034](isaac-sim#2034)
This PR includes changes made in
[2291](isaac-sim#2291) and would be an
alternate candidate.

Fixes [isaac-sim#2139](isaac-sim#2139)

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

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

## Screenshots


![image](https://github.com/user-attachments/assets/c94f877e-b3a9-441a-ad2e-ec6124cc64de)

## 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
- [x] My changes generate no new warnings
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------

Signed-off-by: Kelly Guo <[email protected]>
Signed-off-by: James Tigue <[email protected]>
Signed-off-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
Co-authored-by: Kelly Guo <[email protected]>
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.

[Proposal] More thorough testing of actuators
3 participants