Skip to content

Commit 0877a59

Browse files
author
ipuch
committed
clean(joint-ellipsoid): dead code and comments
1 parent ec9aab0 commit 0877a59

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

include/pinocchio/multibody/joint/joint-ellipsoid.hpp

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ namespace pinocchio
125125
motionSet::se3ActionInverse(m, S.template leftCols<2>(), res.template leftCols<2>());
126126

127127
// Third column: inverse action on [0, 0, 0, 0, 0, 1]^T
128-
// angular part: R^T * e_z
129128
res.template block<3, 1>(ANGULAR, 2) = m.rotation().transpose().col(2);
130-
// linear part: R^T * (t × e_z) = R^T * [-t_y, t_x, 0]^T
131129
res.template block<3, 1>(LINEAR, 2).noalias() =
132130
m.rotation().transpose() * SpatialAxis<5>::CartesianAxis3::cross(m.translation());
133131

@@ -201,27 +199,11 @@ namespace pinocchio
201199
// Motion action on first two columns
202200
typedef SpatialAxis<5> AxisZ;
203201
motionSet::motionAction(m, S.template leftCols<2>(), res.template leftCols<2>());
204-
// res.col(2).noalias() = m.cross(());
205202

206203
// We have to use a MotionRef to deal with the output of the cross product
207204
MotionRef<typename ReturnType::ColXpr> v_col2(res.col(2));
208205
v_col2 = m.cross(AxisRotz());
209206

210-
// // Motion action on third column [0, 0, 0, 0, 0, 1]^T
211-
// // [v; w] × [0; e_z] = [v × e_z; w × e_z]
212-
// const typename MotionDense<MotionDerived>::ConstLinearType & v_lin = m.linear();
213-
// const typename MotionDense<MotionDerived>::ConstAngularType & w = m.angular();
214-
215-
// // v × e_z = [v[1], -v[0], 0]
216-
// res(LINEAR + 0, 2) = v_lin[1];
217-
// res(LINEAR + 1, 2) = -v_lin[0];
218-
// res(LINEAR + 2, 2) = Scalar(0);
219-
220-
// // w × e_z = [w[1], -w[0], 0]
221-
// res(ANGULAR + 0, 2) = w[1];
222-
// res(ANGULAR + 1, 2) = -w[0];
223-
// res(ANGULAR + 2, 2) = Scalar(0);
224-
225207
return res;
226208
}
227209

@@ -249,6 +231,7 @@ namespace pinocchio
249231
// Upper-left dense 2x2 block: S^T * S
250232
res.template topLeftCorner<2, 2>().noalias() =
251233
SMatrix.template leftCols<2>().transpose() * SMatrix.template leftCols<2>();
234+
252235
// Third column/row: S(5, 0), S(5, 1), 1
253236
res(0, 2) = SMatrix(5, 0);
254237
res(1, 2) = SMatrix(5, 1);
@@ -266,24 +249,7 @@ namespace pinocchio
266249
Eigen::Matrix<S1, 6, 3, O1>
267250
operator*(const InertiaTpl<S1, O1> & Y, const JointMotionSubspaceEllipsoidTpl<S2, O2> & S)
268251
{
269-
// none of this work at this stage: I'll squash after the review to make the code disappear.
270-
// // Y * S where last col is [0,0,0,0,0,1]^T (rotation around z-axis)
271-
// // So last column of M is Y * e_z = Y.matrix().col(5)
272-
// typedef Eigen::Matrix<S1, 6, 3, O1> ReturnType;
273-
// typedef InertiaTpl<S1, O1> Inertia;
274-
// ReturnType M;
275-
276-
// // Cache Y.matrix() to avoid computing it twice
277-
// const typename Inertia::Matrix6 Y_mat = Y.matrix();
278-
279-
// // Columns 0-1: Y * S.template leftCols<2>()
280-
// M.template leftCols<2>().noalias() = Y_mat * S.matrix().template leftCols<2>();
281-
282-
// // Column 2: Y * [0,0,0,0,0,1]^T = Y.matrix().col(5)
283-
// M.col(2) = Y_mat.col(Inertia::ANGULAR + 2);
284252
typedef Eigen::Matrix<S1, 6, 3, O1> ReturnType;
285-
// ReturnType M;
286-
// M.noalias() = Y.matrix() * S.matrix();
287253
ReturnType res(6, S.nv());
288254
motionSet::inertiaAction(Y, S.S, res);
289255
return res;
@@ -615,7 +581,6 @@ namespace pinocchio
615581
}
616582

617583
/// \returns An expression of *this with the Scalar type casted to NewScalar.
618-
/// TU todo.
619584
template<typename NewScalar>
620585
JointModelEllipsoidTpl<NewScalar, Options> cast() const
621586
{

0 commit comments

Comments
 (0)