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

Fixes the body index used for computing end-effector Jacobian #22

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

Mayankm96
Copy link
Contributor

Description

The Jacobians returned from ArticulationView follow the shape: [batch, body, 6, dof]. However, it does not include the base body. For Franka Panda arm, this means:

jacob:  torch.Size([128, 10, 6, 9])
bodies:  ['panda_link0', 'panda_link1', 'panda_link2', 'panda_link3', 'panda_link4', 'panda_link5', 'panda_link6', 'panda_link7', 'panda_hand', 'panda_leftfinger', 'panda_rightfinger']
num_bodies:  11
num_dof: 9

Thus, we need to account for the base link when retrieving the Jacobian:

self._data.ee_jacobian[:] = jacobians[:, self.ee_body_index - 1, :,  : self.arm_num_dof]

Fixes #21

Type of change

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

Screenshots

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

Checklist

  • I have run the pre-commit checks with pre-commit run --all-files (see here instructions to set it up)
  • 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

@Mayankm96 Mayankm96 added the bug Something isn't working label Feb 24, 2023
@Mayankm96 Mayankm96 merged commit e92c362 into main Feb 24, 2023
@Mayankm96 Mayankm96 deleted the fix/single-arm-ee-link branch February 24, 2023 19:08
@Mayankm96 Mayankm96 restored the fix/single-arm-ee-link branch February 24, 2023 19:08
@Mayankm96 Mayankm96 deleted the fix/single-arm-ee-link branch February 24, 2023 19:08
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.

[Bug Report] Bugs of body_index & skrl in Orbit
1 participant