Skip to content

Adds body_pose_w and body_projected_gravity_b observations #2212

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

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

Conversation

jtigue-bdai
Copy link
Collaborator

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

Description

This PR add body_pose_w and body_projected_gravity_b observation methods

Fixes # (issue)

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

"""


def link_pose(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we simply call it body_pose_w? What happens if user specifies a list of body ids? I think their flattned version should be given?

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of link_name they must use body_names in asset config IMO.

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 body_pose_w is fine, and body_name is fine. I will switch to body vs link everywhere. (old habit to use link).

As far as the body_ids goes currently this observation will only produce one body driven by (link_name/body_name argument). if the users doesn't set the link name it will grab only the zeroth entry specified in the resolved SceneEntityCfg. So if they specify a list of body_ids they can only pick one of them.

I could see creating it in a way that all body_ids specified in the asset_cfg are provided in a flattened tensor, but this wasn't my original intention.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think flattening it is the most general way to go. If they want the "zeroth" body which is the root, then they should use the root_ alternative functions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thats valid. I will rework it.

@jtigue-bdai jtigue-bdai changed the title Adds link_pose and link_projected_gravity observations Adds body_pose_w and body_projected_gravity_b observations Apr 2, 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