Hello, I'm a undergraduate student of robotics laboratory in snu. Your program looks very interesting and I hope you can help me. I tried looking at the experimental models cpp file for plugingait but my c++ knowledge is limited and it was overwhelming to try and understand my general questions.
I noticed in another forum you said you can mimic the output of nexus from plugin gait joint angles to a very high degree, under 0.0001. In my work I need to get joint axis and then manipulate them, so I would like to calculate plugin gait myself. I have done a good amount of work, but I am off by between 0.1 to 5 degrees. When I test a sit to stand motion is when I have the biggest difference in angles.
I am wondering if you have any advice where you had followed the plugin gait documentation and then realized some other methods were missing. For example, is the angle calculation YXZ, which I think is :
"""
This function find the angle of rotation matrix.
and I calculated rotation matrix by multiply two matrix that we will compare.
if A is before rotate matrix and B is after rotate matrix, then rotation matrix = A * inv(B)
The function only follow the YXZ rotate(euler Rotation).
>>> INPUT: rotation matrix = rotmat = [[a,b,c],
[d,e,f],
[g,h,i]]
>>> OUTPUT: beta angle is rotated angle with y-axis
gamma angle is rotated angle with x-axis
alpha angle is rotated angle with z-axis
gamma = atan2((-rotmat[2,1]),sqrt((rotmat[0,1])**2.0 + (rotmat[1,1])**2.0))
beta = atan2((rotmat[2,0]/cos(gamma)),(rotmat[2,2]/cos(gamma)))
alpha = atan2((rotmat[0,1]/cos(gamma)),(rotmat[1,1]/cos(gamma)))
angle = [180.0 * beta/ pi, 180.0 * gamma / pi, 180.0 * alpha / pi]
Or is it the calculation from the paper from Kadaba:
They caclutated angle from the axis directly.
>>>INPUT : axis1 = [[a,b,c],
[d,e,f],
[g,h,i]]
axis2 = [[j,k,l],
[m,n,o],
[p,q,r]]
>>>OUTPUT : beta = arcsin(((-axis1[2][0])*axis2y[0])+((-axis1[2][1])*axis2y[1])+((-axis1[2][2])*axis2y[2]))
gamma = arcsin((axis1[2][0] * axis2x[0])+(axis1[2][1] * axis2x[1])+(axis1[2][2] * axis2x[2])/cos(beta))
alpha = arcsin((axis1[0][0] * axis2y[0])+(axis1[0][1] * axis2y[1])+(axis1[0][2] * axis2y[2])/cos(beta))
angle = [180.0 * gamma/ pi, 180.0 * beta / pi, 180.0 * alpha / pi]
I see that Mokka imports the c3d file. I was hoping to do all of my calculations by just the ASCII file output from nexus that includes marker locations. Then manually type in the user inputs like leg length. Do you see anything wrong with this?
My last question is if static calibration only applies to the foot (for lower body) or does the hip and/or knee axis also go through this calibration.
Thank you for all help you can give.