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

The parent entity of a joint should be the child link #1042

Open
azeey opened this issue Sep 22, 2021 · 2 comments
Open

The parent entity of a joint should be the child link #1042

azeey opened this issue Sep 22, 2021 · 2 comments
Labels
bug Something isn't working help wanted We accept pull requests!

Comments

@azeey
Copy link
Contributor

azeey commented Sep 22, 2021

Environment

  • OS Version: Ubuntu 18.04
  • Source or binary build? source, ae1a048

Description

  • Expected behavior: The pose component of a joint is relative to its child link, so the parent entity of joint should also be the child link
  • Actual behavior: The parent entity of a joint is currently its model. This causes issues when computing poses of joints or any of it's child XML elements using worldPose.
@azeey azeey added the bug Something isn't working label Sep 22, 2021
@osrf-triage osrf-triage added this to Inbox in Core development Sep 22, 2021
@chapulina
Copy link
Contributor

The parent entity of a joint should be the child link

I don't think it's that straight forward. The joint has technically 2 parents:

  1. The entity that the joint belongs to, which is the model
  2. The default frame of reference for the joint pose, which is the child link

components::ParentEntity currently holds the model entity, and I think that's correct. The question is how can we resolve its pose correctly. Some ideas:

  • Have yet another component, i.e. components::PoseFrame (I think this can become too complicated to maintain, and will probably duplicate some frame semantics functionality already in SDF, so I think it's not a good idea)
  • Handle joints as a special case within worldPose (not ideal, but not too bad)
  • Recommend against using worldPose for joints, and instead handle this in the new Joint class that we need to create eventually (APIs that ease migration from classic #325 )

@scpeters
Copy link
Member

  • Expected behavior: The pose component of a joint is relative to its child link, so the parent entity of joint should also be the child link

Currently the JointPositionController GUI plugin lists the joints in a given model by checking for joints whose ParentEntity component matches a specified model entity. If we did decide to change the ParentEntity of a joint from its model to its child link, I think we'd still want to support this functionality in another way.

components::ParentEntity currently holds the model entity, and I think that's correct.

I also favor keeping a joint's ParentEntity as its containing model

The question is how can we resolve its pose correctly. Some ideas:

  • Handle joints as a special case within worldPose (not ideal, but not too bad)

I think this would be the easiest thing to implement. We are already working around this in the ForceTorque system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted We accept pull requests!
Projects
None yet
Development

No branches or pull requests

3 participants