thomas-haslwanter / 3D_Kinematics

Python and Matlab code, for the book "3D Kinematics"
Other
3 stars 3 forks source link

Vicon Blue Trident IMU #2

Open aaa34169 opened 2 years ago

aaa34169 commented 2 years ago

Dear Thomas

Have you ever worked with the blue trident IMU provided by Vicon ? if no, would you be interested in integrating this IMU to your package ?

regards

Fabien

thomas-haslwanter commented 2 years ago

Hello Fabien,

I have never worked with it. But any new format would be welcome! Are you a Vicon developer? Or a user?

Have you had a look at the hints on http://work.thaslwanter.at/skinematics/html/imus.html#sub-classing-imu-base-for-your-own-sensor-type ?

If you have any problems, please send me a sample data file.

Best regards, thomas

From: Fabien Leboeuf @.> Sent: Tuesday, January 4, 2022 4:14 PM To: thomas-haslwanter/3D_Kinematics @.> Cc: Subscribed @.***> Subject: [thomas-haslwanter/3D_Kinematics] Vicon Blue Trident IMU (Issue #2)

Dear Thomas

Have you ever worked with the blue trident IMU provided by Vicon ? if no, would you be interested in integrating this IMU to your package ?

regards

Fabien

ā€” Reply to this email directly, view it on GitHubhttps://github.com/thomas-haslwanter/3D_Kinematics/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AALVURK4GHOAXF4MGNU2TXDUUMFFDANCNFSM5LHVTXDA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

aaa34169 commented 2 years ago

Thanks for your email Thomas

Though, i known some developer of vicon, i am not a vicon developer. I am in charge of a gait lab , at Nantes hospital (France). I also know as the developer of the Conventional gait model 2. This gait model comes with a python library pyCGM2 . My library is dedicated to clinical gait anaysis. I deal with different sources of measurements, except IMU. I am interested in your library because i would like to integrate IMu data processing to my library.

regards

fabien

thomas-haslwanter commented 2 years ago

Hello Fabien,

In that case it is probably easiest if you send me a sample data file. And in case those are not self-explanatory, also a short description of the data definitions. I can then implement it for you.

Best regards, thomas

From: Fabien Leboeuf @.> Sent: Monday, January 10, 2022 7:14 PM To: thomas-haslwanter/3D_Kinematics @.> Cc: Haslwanter Thomas @.>; Comment @.> Subject: Re: [thomas-haslwanter/3D_Kinematics] Vicon Blue Trident IMU (Issue #2)

Thanks for your email Thomas

Though, i known some developer of vicon, i am not a vicon developer. I am in charge of a gait lab , at Nantes hospital (France). I also know as the developer of the Conventional gait model 2. This gait model comes with a python library pyCGM2 . My library is dedicated to clinical gait anaysis. I deal with different sources of measurements, except IMU. I am interested in your library because i would like to integrate IMu data processing to my library.

regards

fabien

ā€” Reply to this email directly, view it on GitHubhttps://github.com/thomas-haslwanter/3D_Kinematics/issues/2#issuecomment-1009195345, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AALVURMTTL4FTZLLL4DCLRDUVMOU7ANCNFSM5LHVTXDA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.**@.>>

aaa34169 commented 2 years ago

Dear thomas

here are data LeftFoot-gait.csv

I put a Vicon IMU on my left foot then walk back and forth. i collected accelerometer, gyro and magnetometer at a sample frequency of 1200Hz.

if you prefer, i can send you the c3d file instead of the csv file. regards

Fabien

thomas-haslwanter commented 2 years ago

Hello Fabien,

Regarding your left foot šŸ˜‰ The file you have sent me is weird:

Is that really the file that Vicon produces by default? What is the ā€œc3dā€ file?

Best regards, thomas

From: Fabien Leboeuf @.> Sent: Tuesday, January 11, 2022 3:24 PM To: thomas-haslwanter/3D_Kinematics @.> Cc: Haslwanter Thomas @.>; Comment @.> Subject: Re: [thomas-haslwanter/3D_Kinematics] Vicon Blue Trident IMU (Issue #2)

Dear thomas

here are data LeftFoot-gait.csvhttps://github.com/thomas-haslwanter/3D_Kinematics/files/7847189/LeftFoot-gait.csv

I put a Vicon IMU on my left foot then walk back and forth. i collected accelerometer, gyro and magnetometer at a sample frequency of 1200Hz.

if you prefer, i can send you the c3d file instead of the csv file. regards

Fabien

ā€” Reply to this email directly, view it on GitHubhttps://github.com/thomas-haslwanter/3D_Kinematics/issues/2#issuecomment-1010013398, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AALVURMXGFFXROOIC4SGIRLUVQ4Q7ANCNFSM5LHVTXDA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.**@.>>

aaa34169 commented 2 years ago

Hello thomas

I supposed you are not used to the c3d. That's why i sent you a ascii file generated from Mokka, not Vicon The c3d is a extensively used format in motion capture. It s a standard. My library pyCGM2 is based on the c3d. I used the Biomechanical toolkit libray ( a project i contributed some years ago) to read/write data from/into the c3d. I wrote a cheat sheet , you can find here

i embeded btk in my library, you can install it from pyCGM2 or you can install btk from its conda package

You can download the c3d file here here is a snippet you can use to get IMU data

try:
    from pyCGM2 import btk
except:
   import btk

reader = btk.btkAcquisitionFileReader()
    reader.SetFilename("c:/<path>/file.c3d)
    reader.Update()
    acq = reader.GetOutput() # acquisition instance

freq = acq.GetAnalogFrequency()
acc_x_values = acq.GetAnalog("accel.x").GetValues()
acc_y_values = acq.GetAnalog("accel.y").GetValues()
acc_z_values = acq.GetAnalog("accel.z").GetValues()

idem for "gyro" and "mag" instead of "acc" 

I hope that help.

regards

Fabien

aaa34169 commented 2 years ago

Hi Thomas

I have seen a pull request pending about integration of Vicon IMU. I also played round with your package. Integration of a own sensor is actually intuitive.

my goal, first, is to compare angle from your package with those from vicon algorithm (black box for me). Unfortunatly , i have not same values :-( How your code compute the first frame ? if i initialize the rotation matrix, there is no apparent effect ( already reported issue).

have a good day

Fabien