@@ -72,15 +72,15 @@ namespace pinocchio
7272 // /
7373 // / The configuration space uses three angles (q₀, q₁, q₂) representing:
7474 // / - Rotation about the x-axis
75- // / - Rotation about the y-axis
75+ // / - Rotation about the y-axis
7676 // / - Spin about the "normal" direction
7777 // /
7878 // / The joint position on the ellipsoid surface is computed as:
7979 // / \f$ \mathbf{p} = (a \sin q_1, -b \sin q_0 \cos q_1, c \cos q_0 \cos q_1) \f$
8080 // /
8181 // / where \f$ a, b, c \f$ are the radii along the x, y, z axes respectively.
8282 // /
83- // / \note For non-spherical ellipsoids, the third rotation axis is only approximately
83+ // / \note For non-spherical ellipsoids, the third rotation axis is only approximately
8484 // / normal to the surface. It corresponds to the normal of an equivalent sphere while
8585 // / the translation follows the true ellipsoid surface. The "normal" direction is
8686 // / truly normal only when all radii are equal (sphere case).
@@ -159,7 +159,7 @@ namespace pinocchio
159159 {
160160 return JointDataDerived ();
161161 }
162-
162+
163163 // / @brief Default constructor. Creates a sphere (0.01, 0.01, 0.01).
164164 JointModelEllipsoidTpl ()
165165 : radius_a(Scalar(0.01 ))
@@ -195,11 +195,12 @@ namespace pinocchio
195195 // / @param[in] c2, s2 Cosine and sine of q[2]
196196 // / @param[out] data Joint data where M will be stored
197197 void computeSpatialTransform (
198- Scalar c0, Scalar s0, Scalar c1, Scalar s1, Scalar c2, Scalar s2, JointDataDerived & data) const
198+ Scalar c0, Scalar s0, Scalar c1, Scalar s1, Scalar c2, Scalar s2, JointDataDerived & data)
199+ const
199200 {
200201 // clang-format off
201202 data.M .rotation () << c1 * c2 , -c1 * s2 , s1 ,
202- c0 * s2 + c2 * s0 * s1 , c0 * c2 - s0 * s1 * s2 ,-c1 * s0 ,
203+ c0 * s2 + c2 * s0 * s1 , c0 * c2 - s0 * s1 * s2 ,-c1 * s0 ,
203204 -c0 * c2 * s1 + s0 * s2 , c0 * s1 * s2 + c2 * s0 , c0 * c1;
204205 // clang-format on
205206 Scalar nx, ny, nz;
@@ -208,7 +209,6 @@ namespace pinocchio
208209 nz = c0 * c1;
209210
210211 data.M .translation () << radius_a * nx, radius_b * ny, radius_c * nz;
211-
212212 }
213213
214214 template <typename ConfigVector>
@@ -223,7 +223,7 @@ namespace pinocchio
223223 Scalar c2, s2;
224224 SINCOS (data.joint_q (2 ), &s2, &c2);
225225
226- computeSpatialTransform (c0,s0,c1,s1,c2,s2, data);
226+ computeSpatialTransform (c0, s0, c1, s1, c2, s2, data);
227227
228228 computeMotionSubspace (s0, c0, s1, c1, s2, c2, data);
229229 }
@@ -278,7 +278,7 @@ namespace pinocchio
278278 SINCOS (data.joint_q (2 ), &s2, &c2);
279279
280280 computeSpatialTransform (c0, s0, c1, s1, c2, s2, data);
281-
281+
282282 Scalar dndotx_dqdot1, dndoty_dqdot0, dndoty_dqdot1, dndotz_dqdot0, dndotz_dqdot1;
283283 dndotx_dqdot1 = c1;
284284 dndoty_dqdot0 = -c0 * c1;
@@ -392,15 +392,15 @@ namespace pinocchio
392392 S_32 = dndotx_dqdot1 * radius_a * s1 - dndoty_dqdot1 * radius_b * c1 * s0
393393 + dndotz_dqdot1 * radius_c * c0 * c1;
394394
395- data.S .matrix () << S_11 , S_12 , Scalar (0 ),
396- S_21 , S_22 , Scalar (0 ),
395+ data.S .matrix () << S_11 , S_12 , Scalar (0 ),
396+ S_21 , S_22 , Scalar (0 ),
397397 S_31 , S_32 , Scalar (0 ),
398- c1 * c2, s2 , Scalar (0 ),
399- -c1 * s2, c2 , Scalar (0 ),
398+ c1 * c2, s2 , Scalar (0 ),
399+ -c1 * s2, c2 , Scalar (0 ),
400400 s1 , Scalar (0 ), Scalar (1 );
401401 // clang-format on
402402 }
403-
403+
404404 // / @brief Computes the bias acceleration c(q, v) = Sdot(q)·v.
405405 template <typename ConfigVector, typename TangentVector>
406406 void computeBiais (
@@ -447,7 +447,7 @@ namespace pinocchio
447447 qdot1 = data.joint_v (1 );
448448 qdot2 = data.joint_v (2 );
449449
450- // last columns and last element of the second column are zero,
450+ // last columns and last element of the second column are zero,
451451 // so we do not compute them
452452 Scalar Sdot_11, Sdot_21, Sdot_31, Sdot_41, Sdot_51, Sdot_61;
453453 Scalar Sdot_12, Sdot_22, Sdot_32, Sdot_42, Sdot_52;
@@ -496,7 +496,6 @@ namespace pinocchio
496496 * (dndoty_dqdot1 * radius_b * (c0 * s1 * s2 + c2 * s0) + dndotz_dqdot1 * radius_c * (-c0 * c2 + s0 * s1 * s2) + radius_b * (-c0 * c2 + s0 * s1 * s2) * d_dndoty_dqdot0_dq1 - radius_c * (c0 * s1 * s2 + c2 * s0) * d_dndotz_dqdot0_dq1)
497497 + qdot1 * (dndotx_dqdot1 * radius_a * s1 * s2 - dndoty_dqdot1 * radius_b * c1 * s0 * s2 + dndotz_dqdot1 * radius_c * c0 * c1 * s2 - radius_a * c1 * s2 * d_dndotx_dqdot1_dq1 - radius_b * (-c0 * c2 + s0 * s1 * s2) * d_dndoty_dqdot1_dq1 + radius_c * (c0 * s1 * s2 + c2 * s0) * d_dndotz_dqdot1_dq1) - qdot2 * (dndotx_dqdot1 * radius_a * c1 * c2 + dndoty_dqdot1 * radius_b * (c0 * s2 + c2 * s0 * s1) + dndotz_dqdot1 * radius_c * (-c0 * c2 * s1 + s0 * s2));
498498
499-
500499 // Row 3, Column 1
501500 Sdot_31 =
502501 -qdot0 * c1
@@ -518,13 +517,10 @@ namespace pinocchio
518517
519518 Sdot_42 = qdot2 * c2;
520519 Sdot_52 = -qdot2 * s2;
521-
522- data.c .toVector () << Sdot_11 * qdot0 + Sdot_12 * qdot1,
523- Sdot_21 * qdot0 + Sdot_22 * qdot1,
524- Sdot_31 * qdot0 + Sdot_32 * qdot1,
525- Sdot_41 * qdot0 + Sdot_42 * qdot1,
526- Sdot_51 * qdot0 + Sdot_52 * qdot1,
527- Sdot_61 * qdot0;
520+
521+ data.c .toVector () << Sdot_11 * qdot0 + Sdot_12 * qdot1, Sdot_21 * qdot0 + Sdot_22 * qdot1,
522+ Sdot_31 * qdot0 + Sdot_32 * qdot1, Sdot_41 * qdot0 + Sdot_42 * qdot1,
523+ Sdot_51 * qdot0 + Sdot_52 * qdot1, Sdot_61 * qdot0;
528524 }
529525 }; // struct JointModelEllipsoidTpl
530526
0 commit comments