@@ -292,7 +292,7 @@ Eigen::Matrix<T, 4, 3> QuaternionFloatingMobilizer<T>::CalcLMatrix(
292
292
// component of the quaternion (Euler parameters). Notice however here we use
293
293
// qs and qv for the "scalar" and "vector" components of the quaternion q_FM,
294
294
// respectively, while Mitiguy uses ε₀ and ε (in bold), respectively.
295
- // This mobilizer is parameterized by the angular velocity w_FM-F , i.e. time
295
+ // This mobilizer is parameterized by the angular velocity w_FM_F , i.e. time
296
296
// derivatives of the vector component of the quaternion are taken in the F
297
297
// frame. If you are confused by this, notice that the vector component of a
298
298
// quaternion IS a vector, and therefore you must specify in what frame time
@@ -301,11 +301,12 @@ Eigen::Matrix<T, 4, 3> QuaternionFloatingMobilizer<T>::CalcLMatrix(
301
301
// Notice this is equivalent to:
302
302
// Dt_F(q_FM) = 1/2 * w_FM⋅q_FM, where ⋅ denotes the "quaternion product" and
303
303
// both the vector component qv_FM of q_FM and w_FM are expressed in frame F.
304
- // Dt_F(q) is short for [Dt_F(q )]_F.
304
+ // Using Dt_F(q) as an abbreviation of [Dt_F(q_FM )]_F.
305
305
// The expression above can be written as:
306
306
// Dt_F(q) = 1/2 * (-w_FM.dot(qv_F); qs * w_FM + w_FM.cross(qv_F))
307
307
// = 1/2 * (-w_FM.dot(qv_F); qs * w_FM - qv_F.cross(w_FM))
308
308
// = 1/2 * (-w_FM.dot(qv_F); (qs * Id - [qv_F]x) * w_FM)
309
+ // = 1/2 * L(q_FM) * w_FM
309
310
// = L(q_FM/2) * w_FM
310
311
// That is:
311
312
// | -qv_Fᵀ | ⌈ -qx -qy -qz ⌉
@@ -401,8 +402,7 @@ void QuaternionFloatingMobilizer<T>::DoCalcNDotMatrix(
401
402
const Vector4<T> qdot = CalcLMatrixOverTwo (q_FM) * w_FM_F;
402
403
const Quaternion<T> qdot_FM (qdot[0 ], qdot[1 ], qdot[2 ], qdot[3 ]);
403
404
404
- // Leveraging comments and code in CalcLMatrixOverTwo() and noting that
405
- // Nᵣ(qᵣ) = 0.5 * L(q_FM), where the elements of the matrix L are linear in
405
+ // Since Nᵣ(qᵣ) = 0.5 * L(q_FM), where L(q_FM) is linear in the elements of
406
406
// q_FM = [qw, qx, qy, qz]ᵀ, so Ṅᵣ(qᵣ,q̇ᵣ) = 0.5 * L(q̇_FM).
407
407
const Eigen::Matrix<T, 4 , 3 > NrDotMatrix = CalcLMatrixOverTwo (qdot_FM);
408
408
@@ -438,8 +438,8 @@ void QuaternionFloatingMobilizer<T>::DoCalcNplusDotMatrix(
438
438
const Vector4<T> qdot = CalcLMatrixOverTwo (q_FM) * w_FM_F;
439
439
const Quaternion<T> qdot_FM (qdot[0 ], qdot[1 ], qdot[2 ], qdot[3 ]);
440
440
441
- // Since N⁺ᵣ(qᵣ) = 2 * L(q_FM)ᵀ, where L(q_FM) is linear in q_FM, hence
442
- // Ṅ⁺ᵣ(qᵣ,q̇ᵣ) = 2 * L(q̇_FM)ᵀ.
441
+ // Since N⁺ᵣ(qᵣ) = 2 * L(q_FM)ᵀ, where L(q_FM) is linear in the elements of
442
+ // q_FM = [qw, qx, qy, qz]ᵀq_FM, hence Ṅ⁺ᵣ(qᵣ,q̇ᵣ) = 2 * L(q̇_FM)ᵀ.
443
443
const Eigen::Matrix<T, 3 , 4 > NrPlusDot =
444
444
CalcTwoTimesLMatrixTranspose (qdot_FM);
445
445
@@ -482,15 +482,13 @@ void QuaternionFloatingMobilizer<T>::DoMapAccelerationToQDDot(
482
482
// It first calculates the rotational part, then the translational part.
483
483
//
484
484
// For the rotational part of this mobilizer, the 2nd-derivatives of the
485
- // generalized positions q̈_FM = q̈ᵣ = [q̈w, q̈x, q̈y, q̈z]ᵀ are related to the
486
- // 1st-derivatives of the generalized velocities ẇ_FM_F = v̇ᵣ = [ẇx, ẇy, ẇz]ᵀ
487
- // as q̈_FM = Ṅᵣ(q,q̇)⋅v + Nᵣ(q)⋅v̇, where Nᵣ(q ) is the 3x4 matrix below and
488
- // Ṅᵣ(q,q̇)⋅v = -0.25 ω² q_FM, where ω² = |w_FM_F|² and w_FM_F = [wx, wy, wz]ᵀ .
485
+ // generalized positions q̈_FM = [q̈w, q̈x, q̈y, q̈z]ᵀ are related to the
486
+ // 1st-derivatives of generalized velocities ω̇ = ẇ_FM_F = [ω̇x, ω̇y, ω̇z]ᵀ as
487
+ // shown below where L(q_FM ) is the 4x3 matrix documented in CalcLMatrix(),
488
+ // ω = [ωx, ωy, ωz]ᵀ, ω² = |ω|², and 0.5 L̇(q̇_FM)⋅ω = -0.25 ω² q_FM .
489
489
//
490
- // ⌈ q̈w ⌉ ⌈ -qx -qy -qz ⌉ ⌈ ẇx ⌉ ⌈ qw ⌉
491
- // | q̈x | = 0.5 | qw qz -qy | | ẇy | - 0.25 ω² | qx |
492
- // | q̈y | | qw qw qx | ⌊ ẇz ⌋ | qy |
493
- // ⌊ q̈z ⌋ ⌊ qy -qx qw ⌋ ⌊ qz ⌋
490
+ // q̈_FM = 0.5 L(q_FM)⋅ω̇ + 0.5 L̇(q̇_FM)⋅ω
491
+ // = 0.5 L(q_FM)⋅ω̇ - 0.25 ω² q_FM
494
492
//
495
493
// Formulas and proofs in Sections 9.3 and 9.6 of [Mitiguy, August 2025].
496
494
// [Mitiguy, August 2025] Mitiguy, P. Advanced Dynamics & Motion Simulation.
0 commit comments