Skip to content

[Newton] Fix UTs - #3317

Merged
AntoineRichard merged 3 commits into
isaac-sim:dev/newtonfrom
AntoineRichard:antoiner/dev_newton_fix_UTs
Sep 3, 2025
Merged

AntoineRichard merged 3 commits into
isaac-sim:dev/newtonfrom
AntoineRichard:antoiner/dev_newton_fix_UTs

Conversation

@AntoineRichard

Copy link
Copy Markdown
Collaborator

Description

Fix some of our UTs

Type of change

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

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

@AntoineRichard AntoineRichard changed the title UTs most likely fixed [Newton] Fix UTs Sep 1, 2025

@adenzler-nvidia adenzler-nvidia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good in general and works. Some stuff I can't judge added some comments - I could approve, question is how final all of these changes need to be.

I'd rather iterate here than having to do another full review when merging to the main dev branch, but I'll let you guys judge that.

joint_start = builder.joint_count
articulation_start = builder.articulation_count

with Timer(name="newton_add_builder", msg="Add builder took:", enable=False, format="ms"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is the timer removal intentional?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I need to rework all of this with a new timing method.

for i in range(num_articulations):
# since there is a moment applied on the articulation, the articulation should rotate
assert articulation.data.root_ang_vel_w[i, 2].item() > 0.1
assert articulation.data.root_ang_vel_w[i, 2].item() < -1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can't judge that change from far - did you double check?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should be OK? I'm not sure. It just happens to rotate which is what we want, but the direction is odd.

cfg = SimulationCfg(gravity=(0.0, 0.0, 0.0))

sim = SimulationContext(cfg)
SimulationContext(cfg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does that line have side-effects I don't know about or is it unnecessary now?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's not used in the function anymore, but it's needed to see if the gravity value is properly given to our Newton manager.

@AntoineRichard

Copy link
Copy Markdown
Collaborator Author

Looks good in general and works. Some stuff I can't judge added some comments - I could approve, question is how final all of these changes need to be.

I'd rather iterate here than having to do another full review when merging to the main dev branch, but I'll let you guys judge that.

Let's merge it into dev then. I don't think its critical ATM

@AntoineRichard
AntoineRichard merged commit e84370a into isaac-sim:dev/newton Sep 3, 2025
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