pinocchio  2.7.1
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
rnea-second-order-derivatives.hpp
1 //
2 // Copyright (c) 2017-2019 CNRS INRIA
3 
4 #ifndef __pinocchio_algorithm_rnea_second_order_derivatives_hpp__
5 #define __pinocchio_algorithm_rnea_second_order_derivatives_hpp__
6 
7 #include "pinocchio/container/aligned-vector.hpp"
8 #include "pinocchio/multibody/data.hpp"
9 #include "pinocchio/multibody/model.hpp"
10 
11 namespace pinocchio {
70 template <typename Scalar, int Options,
71  template <typename, int> class JointCollectionTpl,
72  typename ConfigVectorType, typename TangentVectorType1,
73  typename TangentVectorType2, typename Tensor1,
74  typename Tensor2, typename Tensor3, typename Tensor4>
76  const ModelTpl<Scalar, Options, JointCollectionTpl> &model,
77  DataTpl<Scalar, Options, JointCollectionTpl> &data,
78  const Eigen::MatrixBase<ConfigVectorType> &q,
79  const Eigen::MatrixBase<TangentVectorType1> &v,
80  const Eigen::MatrixBase<TangentVectorType2> &a,
81  const Tensor1 &d2tau_dqdq, const Tensor2 &d2tau_dvdv,
82  const Tensor3 &dtau_dqdv, const Tensor4 &dtau_dadq);
83 
121 
122 template <typename Scalar, int Options,
123  template <typename, int> class JointCollectionTpl,
124  typename ConfigVectorType, typename TangentVectorType1,
125  typename TangentVectorType2>
129  const Eigen::MatrixBase<ConfigVectorType> &q,
130  const Eigen::MatrixBase<TangentVectorType1> &v,
131  const Eigen::MatrixBase<TangentVectorType2> &a) {
132  (data.d2tau_dqdq).setZero();
133  (data.d2tau_dvdv).setZero();
134  (data.d2tau_dqdv).setZero();
135  (data.d2tau_dadq).setZero();
136 
137  ComputeRNEASecondOrderDerivatives(model, data, q.derived(), v.derived(), a.derived(),
138  data.d2tau_dqdq, data.d2tau_dvdv, data.d2tau_dqdv,
139  data.d2tau_dadq);
140 }
141 
142 } // namespace pinocchio
143 
144 #include "pinocchio/algorithm/rnea-second-order-derivatives.hxx"
145 
146 #endif // ifndef __pinocchio_algorithm_rnea_second_order_derivatives_hpp__
pinocchio::DataTpl
Definition: data.hpp:29
pinocchio::DataTpl::d2tau_dadq
Tensor3x d2tau_dadq
SO Cross-Partial derivative of the joint torque vector with respect to the joint acceleration/configu...
Definition: data.hpp:396
pinocchio::ComputeRNEASecondOrderDerivatives
void 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, const Tensor1 &d2tau_dqdq, const Tensor2 &d2tau_dvdv, const Tensor3 &dtau_dqdv, const Tensor4 &dtau_dadq)
Computes the Second-Order partial derivatives of the Recursive Newton Euler Algorithm w....
pinocchio::DataTpl::d2tau_dqdq
Tensor3x d2tau_dqdq
SO Partial derivative of the joint torque vector with respect to the joint configuration.
Definition: data.hpp:382
pinocchio::DataTpl::d2tau_dvdv
Tensor3x d2tau_dvdv
SO Partial derivative of the joint torque vector with respect to the joint velocity.
Definition: data.hpp:386
pinocchio::DataTpl::d2tau_dqdv
Tensor3x d2tau_dqdv
SO Cross-Partial derivative of the joint torque vector with respect to the joint configuration/veloci...
Definition: data.hpp:390
pinocchio::ModelTpl< Scalar, Options, JointCollectionTpl >
pinocchio
Main pinocchio namespace.
Definition: treeview.dox:11