5 #ifndef __pinocchio_multibody_joint_joint_common_operations_hpp__ 6 #define __pinocchio_multibody_joint_joint_common_operations_hpp__ 8 #include "pinocchio/macros.hpp" 9 #include "pinocchio/math/matrix.hpp" 11 #include <boost/type_traits.hpp> 20 template<typename Scalar, bool is_floating_point = boost::is_floating_point<Scalar>::value>
21 struct PerformStYSInversion
23 template<
typename M1,
typename M2>
24 static EIGEN_STRONG_INLINE
25 void run(
const Eigen::MatrixBase<M1> & StYS,
26 const Eigen::MatrixBase<M2> & Dinv)
28 M2 & Dinv_ = PINOCCHIO_EIGEN_CONST_CAST(M2,Dinv);
30 StYS.llt().solveInPlace(Dinv_);
34 template<
typename Scalar>
35 struct PerformStYSInversion<Scalar, false>
37 template<
typename M1,
typename M2>
38 static EIGEN_STRONG_INLINE
39 void run(
const Eigen::MatrixBase<M1> & StYS,
40 const Eigen::MatrixBase<M2> & Dinv)
42 M2 & Dinv_ = PINOCCHIO_EIGEN_CONST_CAST(M2,Dinv);
54 template<
typename ConfigVectorIn,
typename Scalar,
typename ConfigVectorOut>
55 static void run(
const Eigen::MatrixBase<ConfigVectorIn> & q,
56 const Scalar & scaling,
57 const Scalar & offset,
58 const Eigen::MatrixBase<ConfigVectorOut> & dest)
60 assert(q.size() == dest.size());
61 PINOCCHIO_EIGEN_CONST_CAST(ConfigVectorOut,dest).noalias() = scaling * q + ConfigVectorOut::Constant(dest.size(),offset);
68 template<
typename Jo
int>
76 #endif // ifndef __pinocchio_multibody_joint_joint_common_operations_hpp__
Main pinocchio namespace.