-
Notifications
You must be signed in to change notification settings - Fork 20
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
Compatibility with MX variables #81
Comments
CC @Giulero |
Hi @AFusco99! Can you provide a snippet of code on how you're using the library? Thanks! |
Yes, thanks
This code is functional as long as joint_angles is defined as an SX symbolic variable however in my case I need to define it as an MX symbolic variable as I am using external functions and CasADI only supports MX variables in these cases. |
Got it! It shouldn't be possible to convert SX to MX and vice-versa (it seems open casadi/casadi#1870). I created a branch with some modifications in order to let adam accept also MX types. I opened this PR: #84. You might test changing the branch! |
Fyi: PR #84 merged |
Hi @AFusco99 ! I just noticed that you are using the I guess also that you could use the function Your snippet would become import casadi as cs
import numpy as np
model_path = "panda.urdf"
import adam
from adam.casadi import KinDynComputations
joints_name_list = [
'panda_joint1', 'panda_joint2', 'panda_joint3', 'panda_joint4',
'panda_joint5', 'panda_joint6', 'panda_joint7'
]
joint_angles=cs.MX.sym('q', 7)
root_link = 'panda_link0'
w_H_b = np.eye(4)
kinDyn = KinDynComputations(model_path, joints_name_list, root_link)
frame="panda_hand"
T_mat_fun = kinDyn.forward_kinematics_fun(frame)
Tmat=T_mat_fun(w_H_b,joint_angles) |
Thank you I just tested both options and I was able to work with Mx variables |
Hello,
I wanted to know if you had any suggestion on how to make this library compatible with casadi MX symbolic variables. The joint angles of my manipulator are currently only available in this format and I would like to use your library for the computation of forward and inverse kynematics.
Thank you very much
The text was updated successfully, but these errors were encountered: