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

Problem with subsequent calls of e.g., spaceJacobian() #32

Open
dmronga opened this issue Jul 4, 2022 · 0 comments
Open

Problem with subsequent calls of e.g., spaceJacobian() #32

dmronga opened this issue Jul 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@dmronga
Copy link
Contributor

dmronga commented Jul 4, 2022

Two subsequent calls of the same jacobian method, e.g. spaceJacobian may lead to problems. E.g. in the following code snippet

cout<<robot_model.spaceJacobian("kuka_lbr_l_link_1","kuka_lbr_l_tcp")*robot_model.spaceJacobian("kuka_lbr_l_link_3","kuka_lbr_l_tcp")<<endl;
base::MatrixXd jac_1 = robot_model.spaceJacobian("kuka_lbr_l_link_1","kuka_lbr_l_tcp");
base::MatrixXd jac_2 = robot_model.spaceJacobian("kuka_lbr_l_link_3","kuka_lbr_l_tcp");
cout<<jac_1*jac_2<<endl<<endl;
cout<<"............."<<endl;

Gives the following result:

           0            0  2.22547e-30 -6.56036e-13     0.318285  3.25555e-13     0.318285
           0            0 -3.67039e-18     0.152322  1.56571e-12   -0.0364877  1.80818e-12
           0            0 -1.33528e-29 -9.09349e-13     0.352262  3.92098e-13     0.352262
           0            0     0.261653     0.741985   -0.0626773    -0.741985 -0.000296794
           0            0  6.23216e-13 -5.04035e-12       1.4124  3.59833e-12       1.4124
           0            0    -0.236415      -1.0607    0.0566318     0.763907  0.000268167

           0            0  2.22547e-30 -6.56036e-13     0.318285  3.25555e-13     0.318285
           0            0 -3.67039e-18     0.152322  1.56571e-12   -0.0364877  1.80818e-12
           0            0 -1.33528e-29 -9.09349e-13     0.352262  3.92098e-13     0.352262
           0            0     0.261653     0.741985   -0.0626773    -0.741985  8.12363e-13
           0            0  6.23216e-13 -5.04035e-12       1.4124  3.59833e-12       1.4124
           0            0    -0.236415      -1.0607    0.0566318     0.763907 -8.10076e-12

.............

i.e., the bottom rightmost entries are not identical. Initially, the problem was that references on the same matrix were returned. But even after introducing maps that store each matrix internally, the problem persists.

@dmronga dmronga added the bug Something isn't working label Nov 17, 2022
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

No branches or pull requests

1 participant