kk9six / duet

DUET: Improving Inertial-based Odometry via Deep IMU Online Calibration
GNU General Public License v3.0
3 stars 1 forks source link

Getting the corrected trajectory from the code #1

Closed IslamAAli closed 4 months ago

IslamAAli commented 4 months ago

Hello,

I am experimenting with the code provided in this repo and the following is my output when running the code

test MH_02_easy...
Absolute Orientation Error (AOE): 42.333797454833984
Absolute Yaw Error (AYE): 28.095151901245117
Absolute Velocity Error (AVE): 1.4708905220031738
Relative Translation Error (RTE): 1.0729831457138062
Improvement of Relative Translation Error (RAW, DUET, Improvement): (6.17753, 0.57278615, 0.8986847)
test MH_04_difficult...
Absolute Orientation Error (AOE): 33.38067626953125
Absolute Yaw Error (AYE): 14.906903266906738
Absolute Velocity Error (AVE): 0.9281812906265259
Relative Translation Error (RTE): 0.9212316870689392
Improvement of Relative Translation Error (RAW, DUET, Improvement): (6.2767653, 0.378667, 0.9396896)
test V1_03_difficult...
Absolute Orientation Error (AOE): 84.09977722167969
Absolute Yaw Error (AYE): 31.207916259765625
Absolute Velocity Error (AVE): 0.9891529679298401
Relative Translation Error (RTE): 1.1918177604675293
Improvement of Relative Translation Error (RAW, DUET, Improvement): (6.0033, 0.6075881, 0.89972806)
test V2_02_medium...
Absolute Orientation Error (AOE): 90.2886962890625
Absolute Yaw Error (AYE): 33.42144775390625
Absolute Velocity Error (AVE): 3.675666570663452
Relative Translation Error (RTE): 1.2303855419158936
Improvement of Relative Translation Error (RAW, DUET, Improvement): (5.861313, 1.0981392, 0.80849093)
running time: 4.6120845383027153e-07

First, I wanted to ask what are the units used for each metric, and if they are measured by doing direct dead reckoning on the corrected gyro and accelerometer data?

Secondly, I wanted to ask how to access the trajetory generated from the integration using the corrected gyro and accelerometer. In other words, if I want the EuroC trajectory that I can compare to the ATE, where is this data saved in the code?

Thanks,

kk9six commented 4 months ago

Hi Islam, from the results it seems that the accnet is well trained but gyronet is not. this sometimes happens as the simultaneous training of two nets can easily affect each other, although we have already tried to use the multi-task training strategy. A more robust training strategy is left for future work.

A1) the units are AOE: deg, AYE: deg, AVE: m/s, RTE: m. And yes, they are measured by doing the direct integration on the corrected gyro and acc

A2) we didn't compare the ATE using the pure inertial odometry because it's not useful due to the unbounded drift, you can only find the RTE computation in the code but i imagine you can compute and save the whole trajectory using the same code by simply set start = 0 and the length to n, with inf_trajectory_from_signals function.

i hope it may help you

IslamAAli commented 4 months ago

Hello and Thanks a lot for your reply.

So, how can I train each network alone to get the best results. can you suggest a way to edit the code to do that so that I can achieve good results on both aspects (angular velocity and acceleration). I am ok with doing training twice or by having two models at the end.

kk9six commented 4 months ago

i think its doable and can be easily implemented. one way is to train the gyronet first with gyroloss and freeze accnet parameters. then train the accnet with accloss and freeze the gyronet parameters (please keep this order because the accnet needs the predicted gyro values as input).

another easier way is to simply split the IMUNet into two networks by separating the parts for acc and gyro, e.g., self.error_param_acc and self.error_param_gyro into two models, e.g., class GyroNet, class AccNet, then train them separately (gyro first, then acc).

btw, if you separately train them you can also try to set optimal parameters, e.g., T, for each of them.

just keep in mind that the input of gyronet is the raw measurements while the input of accnet is the corrected gyro values with raw accs. the two losses can be used separately.

IslamAAli commented 4 months ago

Thanks a lot .. I made a fork and will apply this series training method you mentioned. https://github.com/IslamAAli/DUET_seriesTraining

I will close this issue as resolved since my questions has been answered.