19 template <
size_t NUM_JOINTS,
typename SCALAR>
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39 const Vector3s& b_r_point,
40 const Eigen::Matrix<SCALAR, 6, NUM_JOINTS>& b_J_point,
41 Eigen::Matrix<SCALAR, 6, NUM_JOINTS + 6>& i_J_point)
44 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6> i_J_poitOrientation;
47 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6> i_J_poitTranslation;
50 i_J_point << i_J_poitOrientation, i_J_poitTranslation;
62 const Vector3s& b_r_point,
63 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_J_point,
64 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6>& i_J_point)
66 i_J_point << i_R_b, Matrix3s::Zero(), i_R_b * b_J_point;
78 const Vector3s& b_r_point,
79 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_J_point,
80 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6>& i_J_point)
82 i_J_point << -i_R_b * CrossProductMatrix(b_r_point), i_R_b, i_R_b * b_J_point;
98 const Eigen::Matrix<SCALAR, NUM_JOINTS + 6, 1>& generalizedVelocities,
99 const Matrix3s& i_R_b,
100 const Vector3s& b_r_point,
101 const Eigen::Matrix<SCALAR, 6, NUM_JOINTS>& b_J_point,
102 const Eigen::Matrix<SCALAR, 6, NUM_JOINTS>& b_dJdt_point,
103 Eigen::Matrix<SCALAR, 6, NUM_JOINTS + 6>& i_dJdt_point)
106 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6> i_dJdt_pointOrientation;
108 b_J_point.template topRows<3>(), b_dJdt_point.template topRows<3>(), i_dJdt_pointOrientation);
110 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6> i_dJdt_pointTranslation;
112 b_J_point.template bottomRows<3>(), b_dJdt_point.template bottomRows<3>(), i_dJdt_pointTranslation);
114 i_dJdt_point << i_dJdt_pointOrientation, i_dJdt_pointTranslation;
129 const Eigen::Matrix<SCALAR, NUM_JOINTS + 6, 1>& generalizedVelocities,
130 const Matrix3s& i_R_b,
131 const Vector3s& b_r_point,
132 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_J_point,
133 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_dJdt_point,
134 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6>& i_dJdt_point)
137 Matrix3s i_dRdt_b = i_R_b * CrossProductMatrix(generalizedVelocities.template head<3>());
139 i_dJdt_point << i_dRdt_b, Matrix3s::Zero(), i_dRdt_b * b_J_point + i_R_b * b_dJdt_point;
154 const Eigen::Matrix<SCALAR, NUM_JOINTS + 6, 1>& generalizedVelocities,
155 const Matrix3s& i_R_b,
156 const Vector3s& b_r_point,
157 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_J_point,
158 const Eigen::Matrix<SCALAR, 3, NUM_JOINTS>& b_dJdt_point,
159 Eigen::Matrix<SCALAR, 3, NUM_JOINTS + 6>& i_dJdt_point)
162 Vector3s b_v_point = b_J_point * generalizedVelocities.template tail<NUM_JOINTS>();
164 Matrix3s i_dRdt_b = i_R_b * CrossProductMatrix(generalizedVelocities.template head<3>());
166 i_dJdt_point << -i_dRdt_b * CrossProductMatrix(b_r_point) - i_R_b * CrossProductMatrix(b_v_point), i_dRdt_b,
167 i_dRdt_b * b_J_point + i_R_b * b_dJdt_point;
174 template <
typename Derived>
175 static Matrix3s CrossProductMatrix(
const Eigen::DenseBase<Derived>& in)
177 if (in.innerSize() != 3 || in.outerSize() != 1)
178 throw std::runtime_error(
"Input argument should be a 3-by-1 vector.");
181 out <<
SCALAR(0.0), -in(2), +in(1), +in(2),
SCALAR(0.0), -in(0), -in(1), +in(0),
SCALAR(0.0);
188 template <
size_t NUM_JOINTS>
static void FromBaseJacToInertiaJacOrientation(const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_J_point, Eigen::Matrix< SCALAR, 3, NUM_JOINTS+6 > &i_J_point)
Definition: FrameJacobian.h:61
This class provides methods for converting the non-inertia base frame Jacobian matrix to an user defi...
Definition: FrameJacobian.h:20
FrameJacobian()
Definition: FrameJacobian.h:28
CppAD::AD< CppAD::cg::CG< double > > SCALAR
Eigen::Matrix< SCALAR, 3, 1 > Vector3s
Definition: FrameJacobian.h:26
~FrameJacobian()
Definition: FrameJacobian.h:29
static void FromBaseJacobianToInertiaJacobian(const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 6, NUM_JOINTS > &b_J_point, Eigen::Matrix< SCALAR, 6, NUM_JOINTS+6 > &i_J_point)
Definition: FrameJacobian.h:38
static void FromBaseJacToInertiaJacTranslation(const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_J_point, Eigen::Matrix< SCALAR, 3, NUM_JOINTS+6 > &i_J_point)
Definition: FrameJacobian.h:77
static void FromBaseJacobianDevToInertiaJacobianDevTranslation(const Eigen::Matrix< SCALAR, NUM_JOINTS+6, 1 > &generalizedVelocities, const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_J_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_dJdt_point, Eigen::Matrix< SCALAR, 3, NUM_JOINTS+6 > &i_dJdt_point)
Definition: FrameJacobian.h:153
static void FromBaseJacobianDevToInertiaJacobianDevOrientation(const Eigen::Matrix< SCALAR, NUM_JOINTS+6, 1 > &generalizedVelocities, const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_J_point, const Eigen::Matrix< SCALAR, 3, NUM_JOINTS > &b_dJdt_point, Eigen::Matrix< SCALAR, 3, NUM_JOINTS+6 > &i_dJdt_point)
Definition: FrameJacobian.h:128
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Eigen::Matrix< SCALAR, 3, 3 > Matrix3s
Definition: FrameJacobian.h:25
static void FromBaseJacobianDevToInertiaJacobianDev(const Eigen::Matrix< SCALAR, NUM_JOINTS+6, 1 > &generalizedVelocities, const Matrix3s &i_R_b, const Vector3s &b_r_point, const Eigen::Matrix< SCALAR, 6, NUM_JOINTS > &b_J_point, const Eigen::Matrix< SCALAR, 6, NUM_JOINTS > &b_dJdt_point, Eigen::Matrix< SCALAR, 6, NUM_JOINTS+6 > &i_dJdt_point)
Definition: FrameJacobian.h:97