-
Notifications
You must be signed in to change notification settings - Fork 480
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
RelativePose() does not return pose relative to parent #3293
Comments
I am afraid that the documentation is not clear. The In case of links, I think the "parent" entity of the link is the parent model, but I am not sure, probably you can find out this by looking for the use of the If that is the case, do you have any suggestions on how to improve the docs? |
@traversaro Thank you very much for the explanation. Since there is no bug, we can close this post. Regarding the documentation, I would say that we can keep it for now. I tried to find posts describing the same problem I was having and the only one I found was this: https://answers.gazebosim.org//question/14824/get-a-pose-of-nested-model-relative-to-its-parent-model/ So, this leads me to believe that for most of the developers, the documentation is clear. For the ones that the documentation is not clear, I hope they find your explanation useful :) To find the transformation between the child and the parent link, this did the trick for me:
Thank you! |
Great! Just a small comment, the // parent_H_child = (base_H_parent)^{-1} * base_H_child = parent_H_base * base_H_child
auto pose_wheel = joint->GetParent()->RelativePose().inverse()*joint->GetChild()->RelativePose(); |
Environment
Description
Steps to reproduce
joints_wheels_->GetChild()->RelativePose();
. This will return the pose relative to the base link of the robot instead of the previous link (which is the "base_motors_platform_link" in the example above).Output
As result of this, the transformation of the wheels is incorrect and the representation on RVIZ looks like this:
The representation on Gazebo looks fine, so I assume my URDF is good
As per the URDF that I defined, the relative pose in X and Z should be 0.0 0.0 when the model spawns, however this is not the case.
[gazebo-1] Relative Pose: 0.242962 0.157838 -0.091999 -0.000238 -0.039842 0.044572
I hope my explanation is clear. If something else is necessary, I can provide more information.
Thank you.
The text was updated successfully, but these errors were encountered: