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

forwardKinematics is not working consistent? #27

Open
peetCreative opened this issue Oct 20, 2021 · 3 comments
Open

forwardKinematics is not working consistent? #27

peetCreative opened this issue Oct 20, 2021 · 3 comments

Comments

@peetCreative
Copy link

While adding some tests to my library I came across strange behaviors of the function Robot::forwardKinematics. So I added tests #26 to frankx. The first test simply checks if Robot::forwardKinematics with Robot::currentJointPositions results in the same Affine as Robot::currentPose. As I see in the implementation these functions read (readOnce) from libfranka. So I ask myself, if the implementation of forwardKinematics is incorrect.
However I suspect my self to have a misconception as this function is one of the central functions.

Maybe you want to add the tests anyway to the library.
Thanks

@peetCreative
Copy link
Author

After a bit debugging I added some tests which showed me, that the Transformation calculated by Kinematics::forward is exactly is just 180° (opposit direction) to the expected. The pairs of corresponding pose and joint positions the test expected I read by small a home example application.
I started having a look at your forward implementation but was not sure..
You might integrate the test if you want..
Thanks

@pantor
Copy link
Owner

pantor commented Dec 8, 2021

So the forward and inverse kinematics implementation are really just a minor spin-off of this library. They are (and should not be) used for central functions, and do much worse in terms of speed, accuracy and robustness than KDL or other solvers. I just use them to calculate an elbow angle that matches my requirements.

As these methods are quite tailored to my needs, I've probably added a fixed offset to the kinematics calculation, leading to this 180° difference between the official and my end-effector position. Please also note that some things changed with libfranka version v0.8.0 in this regard. I'll have a look at your tests soon.

@firstPrinciple1
Copy link

@pantor @peetCreative Did you manage to resolve these issues in the meantime?

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

No branches or pull requests

3 participants