-
Notifications
You must be signed in to change notification settings - Fork 69
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
cpp-visualizer: getWorldLinkTransform returns zero position #836
Comments
@S-Dafarra did you ever noticed this problem, or do you see any possible cause? |
I am able to reproduce it. Investigating. |
I light of this comment #515 (comment), not sure if it is possible that I am misunderstanding the output of those methods |
I think there is also another issue. Both An additional note. The fact that both methods use the
|
Thanks @lrapetti and @S-Dafarra for handling this. I wanted just to add that probably a simple test for this methods (that I do not remember why it was implemented) could be to add a loop in #515 to check that the output of getWorldLinkTransform matches the one that you can compute with the KinDynComputations. |
Looking also at the method description: idyntree/src/visualization/include/iDynTree/Visualizer.h Lines 590 to 595 in 2e5cf71
this do not return the actual pose of the link, but it is the vector transformation matrix that express a vector (as homoegenous vector) to the world orientation frame. Indeed it basically represents just a rotation of reference frame. I guess I should then look at something else to get the position of the link. At a first look I didn't find any other method to get it. |
If that is the case, the documentation may need to be revised, as in your comment @lrapetti you wrote "to the world orientation frame", but that is not written there. Furthermore, if the function just returns a rotation, it should either return a rotation object or at least be callled getWorldLinkRotation . |
30eddcf in https://github.com/robotology/idyntree/tree/fix/visualization/getWorldPose should fix the problem. |
In any case, I agree that a test should be added. This was most likely broken since the beginning. |
If the fix is working fine we can also add the fix directly without any test, working library + test is the best, but even just working library with no test is better then not working library. : ) |
I agree on fixing it. Anyway, in view of #515 (comment) I am not sure if that was an error or was done on purpose. I don't see otherwise why |
If we fix it, I think we might also remove the latter part in the documentation of the two methods idyntree/src/visualization/include/iDynTree/Visualizer.h Lines 583 to 595 in 2e5cf71
should be enough |
If I remember well, I think I was trying to implement a visualizer process for base estimation back in time, the set and reset link colors were added to check the frames in contact. I do not remember why the |
Actually, I don't know why the |
So we can think the fix shouldn't brake any code.
If that is the case, I guess it can be either changed in order to stream the base pose, or directly removed if not used anywhere. |
Let's not remove it altogether as it would break the ABI. Modifying it to have a sane semantics make sense to me, otherwise we can just deprecated it and remove it in iDynTree 4.0 |
I would just deprecate it, also because it is not clear that "Model" refers to the base. |
@S-Dafarra let me know if you are planning to open the PR, otherwise I can take care of it. |
Feel free to push on that branch if you like 😉 |
PR opened: #838 |
The methods
getWorldLinkTransform
andgetWorldModelTransform
of the cpp visualizer returns zero-vector for the position of all the links.A simple way to test it is to add the following lines to the visualization loop of the
idyntree-model-view
The output is the following
The text was updated successfully, but these errors were encountered: