b-brebion / revert-gait-app

1 stars 0 forks source link

Export landmark motion #1

Open opeltre opened 3 years ago

opeltre commented 3 years ago

Landmarks are passed to the session function here.

We need to understand how they are stored and what meaningful data to log for later

opeltre commented 3 years ago

skeleton.modelTransform(for: jointName) represents a rigid motion (in the Euclid group Euc(3)) acting on X in R3 by:

[ R T] @ [X] = [RX + T]
[ 0 1]   [1]   [  1   ]

but the logged matrix is actually the transpose of this 4*4 matrix associated to (R, T).

Example log:

> bodyAnchor.skeleton.modelTransform(
      for: ARSkeleton.JointName(rawValue: "spine_1_joint"))
  )

spine 1 (model) Optional(simd_float4x4(
[[0.0063593388  , 0.9999453     , -0.008331686  , 0.0], 
 [-0.107756965  , 0.008968352   , 0.994137      , 0.0], 
 [0.99415714    , -0.0054244692 , 0.10780787    , 0.0], 
 [-3.9490377e-08, 1.2290119e-13 , 5.235605e-14  , 1.0]]))
opeltre commented 3 years ago

Quelques liens utiles: