5 #ifndef __pinocchio_algorithm_frames_derivatives_hpp__
6 #define __pinocchio_algorithm_frames_derivatives_hpp__
8 #include "pinocchio/multibody/model.hpp"
9 #include "pinocchio/multibody/data.hpp"
37 template<
typename,
int>
class JointCollectionTpl,
38 typename Matrix6xOut1,
39 typename Matrix6xOut2>
43 const JointIndex joint_id,
46 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
47 const Eigen::MatrixBase<Matrix6xOut2> & v_partial_dv);
71 template<
typename,
int>
class JointCollectionTpl,
72 typename Matrix6xOut1,
73 typename Matrix6xOut2>
77 const FrameIndex frame_id,
79 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
80 const Eigen::MatrixBase<Matrix6xOut2> & v_partial_dv)
82 PINOCCHIO_CHECK_INPUT_ARGUMENT((
int)frame_id < model.nframes,
"The frame_id is not valid.");
87 const Frame & frame = model.frames[frame_id];
88 typename Data::SE3 & oMframe = data.oMf[frame_id];
92 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut1, v_partial_dq),
93 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut1, v_partial_dv));
130 template<
typename,
int>
class JointCollectionTpl,
131 typename Matrix6xOut1,
132 typename Matrix6xOut2,
133 typename Matrix6xOut3,
134 typename Matrix6xOut4>
138 const JointIndex joint_id,
141 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
142 const Eigen::MatrixBase<Matrix6xOut2> & a_partial_dq,
143 const Eigen::MatrixBase<Matrix6xOut3> & a_partial_dv,
144 const Eigen::MatrixBase<Matrix6xOut4> & a_partial_da);
176 template<
typename,
int>
class JointCollectionTpl,
177 typename Matrix6xOut1,
178 typename Matrix6xOut2,
179 typename Matrix6xOut3,
180 typename Matrix6xOut4>
184 const FrameIndex frame_id,
186 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
187 const Eigen::MatrixBase<Matrix6xOut2> & a_partial_dq,
188 const Eigen::MatrixBase<Matrix6xOut3> & a_partial_dv,
189 const Eigen::MatrixBase<Matrix6xOut4> & a_partial_da)
191 PINOCCHIO_CHECK_INPUT_ARGUMENT((
int)frame_id < model.nframes,
"The frame_id is not valid.");
196 const Frame & frame = model.frames[frame_id];
197 typename Data::SE3 & oMframe = data.oMf[frame_id];
201 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut1, v_partial_dq),
202 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut2, a_partial_dq),
203 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut3, a_partial_dv),
204 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut4, a_partial_da));
243 template<
typename,
int>
class JointCollectionTpl,
244 typename Matrix6xOut1,
245 typename Matrix6xOut2,
246 typename Matrix6xOut3,
247 typename Matrix6xOut4,
248 typename Matrix6xOut5>
252 const JointIndex joint_id,
255 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
256 const Eigen::MatrixBase<Matrix6xOut2> & v_partial_dv,
257 const Eigen::MatrixBase<Matrix6xOut3> & a_partial_dq,
258 const Eigen::MatrixBase<Matrix6xOut4> & a_partial_dv,
259 const Eigen::MatrixBase<Matrix6xOut5> & a_partial_da)
262 model, data, joint_id, placement, rf, PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut1, v_partial_dq),
263 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut3, a_partial_dq),
264 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut4, a_partial_dv),
265 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut5, a_partial_da));
267 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut2, v_partial_dv) = a_partial_da;
303 template<
typename,
int>
class JointCollectionTpl,
304 typename Matrix6xOut1,
305 typename Matrix6xOut2,
306 typename Matrix6xOut3,
307 typename Matrix6xOut4,
308 typename Matrix6xOut5>
312 const FrameIndex frame_id,
314 const Eigen::MatrixBase<Matrix6xOut1> & v_partial_dq,
315 const Eigen::MatrixBase<Matrix6xOut2> & v_partial_dv,
316 const Eigen::MatrixBase<Matrix6xOut3> & a_partial_dq,
317 const Eigen::MatrixBase<Matrix6xOut4> & a_partial_dv,
318 const Eigen::MatrixBase<Matrix6xOut5> & a_partial_da)
320 PINOCCHIO_CHECK_INPUT_ARGUMENT((
int)frame_id < model.nframes,
"The frame_id is not valid.");
325 const Frame & frame = model.frames[frame_id];
326 typename Data::SE3 & oMframe = data.oMf[frame_id];
330 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut1, v_partial_dq),
331 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut2, v_partial_dv),
332 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut3, a_partial_dq),
333 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut4, a_partial_dv),
334 PINOCCHIO_EIGEN_CONST_CAST(Matrix6xOut5, a_partial_da));
338 #include "pinocchio/algorithm/frames-derivatives.hxx"
340 #if PINOCCHIO_ENABLE_TEMPLATE_INSTANTIATION
341 #include "pinocchio/algorithm/frames-derivatives.txx"
ReferenceFrame
Various conventions to express the velocity of a moving frame.
Main pinocchio namespace.
void getFrameAccelerationDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex joint_id, const SE3Tpl< Scalar, Options > &placement, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xOut1 > &v_partial_dq, const Eigen::MatrixBase< Matrix6xOut2 > &a_partial_dq, const Eigen::MatrixBase< Matrix6xOut3 > &a_partial_dv, const Eigen::MatrixBase< Matrix6xOut4 > &a_partial_da)
Computes the partial derivatives of the spatial acceleration of a frame given by its relative placeme...
void getFrameVelocityDerivatives(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const DataTpl< Scalar, Options, JointCollectionTpl > &data, const JointIndex joint_id, const SE3Tpl< Scalar, Options > &placement, const ReferenceFrame rf, const Eigen::MatrixBase< Matrix6xOut1 > &v_partial_dq, const Eigen::MatrixBase< Matrix6xOut2 > &v_partial_dv)
Computes the partial derivatives of the spatial velocity of a frame given by its relative placement,...
A Plucker coordinate frame attached to a parent joint inside a kinematic tree.
JointIndex parentJoint
Index of the parent joint.
SE3 placement
Position of kinematic element in parent joint frame.