It seems that the RCMG generates for spherical 3D rotational joints (and subsequently also for free and cor which internally use spherical) non-uniformly distributed data.
Why this is problematic? Such a non-uniform distribution can bias a downstream ML model training. For example in the EMBC paper, it was observed that the RNNO a-prior predicts at $t=0$ a unit quaternion. (this requires itself confirmation).
Additionally, this might be also one of the causes, why the EMBC RNNO struggled with completely randomly rotated IMUs?
Current RCMG spherical joint logic is here
and it roughly follows the following:
keys = jax.random.split(consume, 3)
# creates three angle trajectories over time
angles = jax.vmap(random_angle_over_time)(keys, ...)
quats = quat_euler(angles)
Better logic (only illustrative for T1 and T2):
q_T1 = quat_random_uniform()
q_delta = quat_random_uniform(min_val=delta_ang_min, max_val=delta_ang_max)
q_delta_traj = cosine_slerp_interp(T2 - T1, Ts, [1, 0, 0, 0], q_delta)
q_traj_T2_T1 = qmt.qmult(q_delta_traj, q_T1)
Step 1): Confirm that this is actually the case by generating data and analysing the current distribution.
Step 2): If yes, implement better logic.
Step 3): Re-train RNNO; is the issue resolved?
It seems that the
RCMGgenerates forspherical3D rotational joints (and subsequently also forfreeandcorwhich internally usespherical) non-uniformly distributed data.Why this is problematic? Such a non-uniform distribution can bias a downstream ML model training. For example in the EMBC paper, it was observed that the$t=0$ a unit quaternion. (this requires itself confirmation).
RNNOa-prior predicts atAdditionally, this might be also one of the causes, why the EMBC
RNNOstruggled with completely randomly rotated IMUs?Current
RCMGsphericaljoint logic is herering/src/ring/algorithms/jcalc.py
Line 679 in f7c67e8
and it roughly follows the following:
Better logic (only illustrative for
T1andT2):Step 1): Confirm that this is actually the case by generating data and analysing the current distribution.
Step 2): If yes, implement better logic.
Step 3): Re-train
RNNO; is the issue resolved?