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

Kinematics example not working #30

Open
guenhael opened this issue Dec 16, 2021 · 1 comment
Open

Kinematics example not working #30

guenhael opened this issue Dec 16, 2021 · 1 comment

Comments

@guenhael
Copy link

guenhael commented Dec 16, 2021

Hello,

I wrote a short example of Kinematics.forward and Kinematics.inverse used successively so that the output should be the same as the input but it is not always the case:

from frankx import Kinematics, Affine

q = [-1.45549, 1.15401, 1.50061, -2.30909, -1.3141, 1.9391, 0.02815]
x = Affine(Kinematics.forward(q))
q_new = Kinematics.inverse(x.vector(), q)
print('Inital joints: ', q)
print('New joints: ', q_new)

q = [-0.012, 0.215, 0.097, -2.26, -0.388, 2.04, 1.45]
x = Affine(Kinematics.forward(q))
q_new = Kinematics.inverse(x.vector(), q)
print('Inital joints: ', q)
print('New joints: ', q_new)

Here is the output I get:

Inital joints: [-1.45549, 1.15401, 1.50061, -2.30909, -1.3141, 1.9391, 0.02815]
New joints: [-1.45543159 1.15399955 1.50062745 -2.30901084 -1.31383838 1.93888225 0.02806562]
Inital joints: [-0.012, 0.215, 0.097, -2.26, -0.388, 2.04, 1.45]
New joints: [-0.2064247 0.31382151 -0.01503988 -2.10968927 1.29631794 1.56807399 2.97976908]

@peetCreative
Copy link

This is connected to #27 and #26 .

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

2 participants