You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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]
The text was updated successfully, but these errors were encountered: