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

Add body_incoming_joint_wrench_b to ArticulationData field #2128

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jtigue-bdai
Copy link
Collaborator

@jtigue-bdai jtigue-bdai commented Mar 21, 2025

Description

This PR exposes the physics tensor view of the joint reaction wrenches.

Fixes #2127
1566

Type of change

  • New feature (non-breaking change which adds functionality)

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 Mar 21, 2025
@jtigue-bdai jtigue-bdai added the enhancement New feature or request label Mar 21, 2025
@Mayankm96
Copy link
Contributor

Small question: Should this be a sensor if we want to model it as force-torque sensor with some frequency?

def body_joint_reaction_wrench_b(self) -> torch.Tensor:
"""Joint reaction wrench applied from body parent to child body in parent body frame.

Shape is (num_instances, num_bodies, 6). All body reaction wrenches are provided including the root body to the
Copy link
Contributor

@Mayankm96 Mayankm96 Mar 22, 2025

Choose a reason for hiding this comment

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

Maybe useful to link to this documentation

https://nvidia-omniverse.github.io/PhysX/physx/5.5.1/docs/Articulations.html#link-incoming-joint-force

Also the wording seems slightly confusing. The forces are in CoM frame or link frame? We have been using "_b" for link frame so if it not the latter, we should use something else I feel.

NIT: body joint reaction wrench seems a strange name to call it? Might be simpler to call it body_reaction_wrench or body_incoming_wrench 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah documentation link is good. The output is the force/torque at a joint in the bodies link frame orientation (need to double check if it's the parent or child body).

Yeah I don't really like it either. I went back and forth on the naming. There are as many wrenches as bodies but they are the result of wrenches imparted at joints. I'm down for other names.

Copy link
Collaborator Author

@jtigue-bdai jtigue-bdai Mar 24, 2025

Choose a reason for hiding this comment

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

what about body_incoming_joint_wrench_b that way it stays a bit more in convention with the physx documentation?


# check shape
self.assertEqual(
articulation.data.body_joint_reaction_wrench_b.shape,
Copy link
Contributor

Choose a reason for hiding this comment

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

Might make sense to test shape for an asset with more than one joint?

@jtigue-bdai
Copy link
Collaborator Author

jtigue-bdai commented Mar 22, 2025

Small question: Should this be a sensor if we want to model it as force-torque sensor with some frequency?

I think there is room to do a separate "sensor" that has the added abilities like offset frames, sensor updates, visualizations, sub selection of axes, and the like. Especially if a users is only interested in a single frame.

I figured this would be the most easiest way to get all data available quickly since it was already part of the physics tensor API.

@jtigue-bdai jtigue-bdai changed the title Add body_joint_reaction_wrench_b ArticulationData field Add body_incoming_joint_wrench_b to ArticulationData field Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants