Template Function pinocchio::ComputeRNEASecondOrderDerivatives(const ModelTpl<Scalar, Options, JointCollectionTpl>&, DataTpl<Scalar, Options, JointCollectionTpl>&, const Eigen::MatrixBase<ConfigVectorType>&, const Eigen::MatrixBase<TangentVectorType1>&, const Eigen::MatrixBase<TangentVectorType2>&)
Defined in File rnea-second-order-derivatives.hpp
Function Documentation
-
template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2>
inline void pinocchio::ComputeRNEASecondOrderDerivatives(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data, const Eigen::MatrixBase<ConfigVectorType> &q, const Eigen::MatrixBase<TangentVectorType1> &v, const Eigen::MatrixBase<TangentVectorType2> &a) Computes the Second-Order partial derivatives of the Recursive Newton Euler Algorithms with respect to the joint configuration, the joint velocity and the joint acceleration.
Remark
d2tau_dqdq, d2tau_dvdv2, d2tau_dqdv and d2tau_dadq must be first initialized with zeros (d2tau_dqdq.setZero(),etc). The storage order of the 3D-tensor derivatives is important. For d2tau_dqdq, the elements of generalized torque varies along the rows, while elements of q vary along the columns and pages of the tensor. For d2tau_dqdv, the elements of generalized torque varies along the rows, while elements of v vary along the columns and elements of q along the pages of the tensor. Hence, d2tau_dqdv is essentially d (d tau/dq)/dv, with outer-most derivative representing the third dimension (pages) of the tensor. The tensor d2tau_dadq reduces down to dM/dq, and hence the elements of q vary along the pages of the tensor. In other words, this tensor derivative is d(d tau/da)/dq. All other remaining combinations of second-order derivatives of generalized torque are zero.
See also
- Template Parameters:
JointCollection – Collection of Joint types.
ConfigVectorType – Type of the joint configuration vector.
TangentVectorType1 – Type of the joint velocity vector.
TangentVectorType2 – Type of the joint acceleration vector.
- Parameters:
model – [in] The model structure of the rigid body system.
data – [in] The data structure of the rigid body system.
q – [in] The joint configuration vector (dim model.nq).
v – [in] The joint velocity vector (dim model.nv).
a – [in] The joint acceleration vector (dim model.nv).
- Returns:
The results are stored in data.d2tau_dqdq, data.d2tau_dvdv, data.d2tau_dqdv, and data.d2tau_dadq which respectively correspond to the Second-Order partial derivatives of the joint torque vector with respect to the joint configuration, velocity and cross Second-Order partial derivatives with respect to configuration/velocity and configuration/acceleration respectively.