pslade2 / RealTimeKin

20 stars 9 forks source link

Model rotated at 90 degrees and always "standing". #6

Open BrunOrsattiAS opened 1 year ago

BrunOrsattiAS commented 1 year ago

Hi Patrick,

Thank you for all your support in getting the system up and running smoothly.

Currently, we have already connected 7 sensors corresponding to the lower limbs. Unfortunately, as it appears in another report here, the whole skeleton is rotated 90 degrees, although all movements are performed correctly but rotated (as if walking on the wall). We have checked and the configuration is exactly the same as discussed in the published system article, with the reference frames pointing correctly. The model used is the one in the folder RealTimeKin called "calibrated_Rajagopal_2015" and the OpenSim is 4.2 and also tried with 4.0. It is important to mention that the configuration is in "ONLINE" mode because this is the only way to obtain a .sto file with the inverse kinematics calculation. In case of using "OFFLINE" unfortunately it is not done and the .sto file does not contain anything (how could it be solved?) and the interest of using a higher accuracy of the movements is desired.

opensim_snapshot

However, we proceeded to make the adjustment discussed in the other post where they change

sensor_to_opensim_rotations = Vec3(-np.pi/2,head_err,0)

to:

sensor_to_opensim_rotations = Vec3(0, 0, 0, 0)

This indeed seems to rotate the model. However, the movement is no longer as expected, making strange movements and not the correct ones. We have made different changes with the values because as it is commented to make coincide the frame of reference of the imu of the pelvis with the one of OpenSim, but in no case after the first instant the movement is correct.

Another doubt that has arisen is that even though the imu is placed at rest on a table, the values captured are always as if they were taken from a person, i.e. it does not detect an initial difference between the user lying down or standing up. Is this correct? That is, despite being lying down, the model starts as if it were standing still (in this case rotated by 90, i.e. it always starts the same).

I hope you can help us with these two problems that we have encountered and can't find a way to solve. On the other hand, is it in the workers.py file where the IMU configuration is set?

Thank you very much.

I attach files of values obtained (Recording_1 and Recording_25 corresponding to a shot with Vec3(-np.pi/2,head_err,0) and the others with different rotations with values (0,0,0) among others). Recordings_ALL.zip