pyomeca / biorbd

Biomechanical add-ons to the RigidBody Dynamics Library
https://pyomeca.github.io/Documentation/biorbd/index.html
MIT License
68 stars 45 forks source link

Possible to use coordinates of pose estimation with pyomeca? #317

Open gabriead opened 1 year ago

gabriead commented 1 year ago

Hi folks, I am completely new to Biomechanics and have been looking at it only from the perspective of pose estimation. Is it possible to use the data of a pose estimation model (e.g. MediaPipe) directly with pyomeca? How would I transfer the joint coordinates in a format that pyomeca can use (e.g. c3d)? Thank's a lot!

pariterre commented 1 year ago

Hi @gabriead That actually depends on what you used to collect the data. For instance, if you used a vicon system and used the inverse kinematics (inverse kinematics is the process to get angles from skin marker data), pyomeca (https://github.com/pyomeca/pyomeca) can read them directly. You can also read them using ezc3d (https://github.com/ezc3d/ezc3d).

I am not aware how MediaPipe stores their data though. If you can export in c3d, you definitely can retrieve them using ezc3d. If they are storing them the same way Vicon does, them pyomeca can directly be used. If you are a C++ or Matlab developer, ezc3d is your sole option though. I've seen that you are doing java, if you want to use our code, you'll have to update the SWIG interface for java (which could be a nice add on to ezc3d hahaha)

Hope this helps!