Some code of screw theory in Matlab
-
omega_skew = skew(omega)
This function is for calculation the skew symmetric matrix -
R = exposkew(omega, theta)
This function is for creating the rotational matrix by using Rodrigues' formula -
T = Twist2Trans(twist, theta)
This function is for transforming twist coordinates ξ = [v;ω] to homogeneous transformation matrix -
Tinv = TransInv(T)
This function is for calculating the inverse transformation matrix in SE(3) -
T = FKtwist(twistlist, thetalist, Initconfig)
This function is for the calculation of forward kinematics of the manipulator for the final tool frame configuration with twist coordinate inputs -
Adg = Trans2adjoint(Trans)
This function is for calculating the adjoint transformation which is a 6*6 matrix which transforms twists from one coordinate frame to another. -
AdgInv = Trans2Invadjoint(Trans)
This function is for calculating the inverse adjoint transformation which is a 6*6 matrix which transforms twists from one coordinate frame to another. -
Jacob = JacobianSpatial(twistlist, thetalist)
This function is for the calculation of spatial manipulator Jacobian -
Jacob = JacobianBody(twistlist, thetalist, Initconfig)
This function is for the calculation of body manipulator Jacobian where the end-effector velocities are with respect to the tool frame. -
tauVec = InverseDynamics(thetaVec, dthetaVec, ddthetaVec, g, Ftip, Mlist, Glist, Slist)
This function uses forward-backward Newton-Euler iterations to solve the inverse dynamics