5 #ifndef __pinocchio_autodiff_cppad_hpp__ 6 #define __pinocchio_autodiff_cppad_hpp__ 8 #include "pinocchio/math/fwd.hpp" 9 #define PINOCCHIO_WITH_CPPAD_SUPPORT 16 #define EIGEN_MATRIXBASE_PLUGIN <pinocchio/autodiff/cppad/math/eigen_plugin.hpp> 18 #include <cppad/cppad.hpp> 19 #include <Eigen/Dense> 29 template<
typename Scalar>
30 struct constant_pi<
CppAD::AD<Scalar> > : constant_pi<Scalar>
35 static inline ADScalar
get(
const mpl::int_<N>& n)
37 return ADScalar(constant_pi<Scalar>::get(n));
51 template<
typename Scalar>
54 #if EIGEN_VERSION_AT_LEAST(3,2,90) 59 return CppAD::Value(x);
68 template <
class Base>
struct NumTraits<
CppAD::AD<Base> >
70 typedef CppAD::AD<Base>
Real;
86 RequireInitialization = 1 ,
96 {
return CppAD::numeric_limits< CppAD::AD<Base> >::epsilon(); }
102 CppAD::numeric_limits< CppAD::AD<Base> >::epsilon();
107 {
return CppAD::numeric_limits< CppAD::AD<Base> >
::min(); }
111 {
return CppAD::numeric_limits< CppAD::AD<Base> >
::max(); }
115 {
return CppAD::numeric_limits< CppAD::AD<Base> >::digits10; }
120 #include "pinocchio/utils/static-if.hpp" 126 template <
class Base>
const AD<Base>&
conj(
const AD<Base>&
x)
128 template <
class Base>
const AD<Base>&
real(
const AD<Base>&
x)
132 template <
class Base> AD<Base>
imag(
const AD<Base>& )
133 {
return CppAD::AD<Base>(0.); }
134 template <
class Base> AD<Base>
abs2(
const AD<Base>&
x)
137 template<
typename Scalar>
138 AD<Scalar>
min(
const AD<Scalar>&
x,
const AD<Scalar>& y)
145 template<
typename Scalar>
146 AD<Scalar>
max(
const AD<Scalar>&
x,
const AD<Scalar>& y)
155 #include "pinocchio/utils/static-if.hpp" 159 template<
typename Scalar>
168 return ADScalar(Base::template precision<degree>());
175 #include "pinocchio/autodiff/cppad/spatial/se3-tpl.hpp" 176 #include "pinocchio/autodiff/cppad/spatial/log.hxx" 177 #include "pinocchio/autodiff/cppad/utils/static-if.hpp" 178 #include "pinocchio/autodiff/cppad/math/quaternion.hpp" 179 #include "pinocchio/autodiff/cppad/algorithm/aba.hpp" 182 #endif // #ifndef __pinocchio_autodiff_cppad_hpp__ const AD< Base > & conj(const AD< Base > &x)
Eigen::Matrix< typename ComplexMatrix::RealScalar, ComplexMatrix::RowsAtCompileTime, ComplexMatrix::ColsAtCompileTime, ComplexMatrix::Options > imag(const Eigen::MatrixBase< ComplexMatrix > &complex_mat)
static CppAD::AD< Base > highest(void)
TaylorSeriesExpansion< Scalar > Base
CppAD::AD< Scalar > ADScalar
AD< Scalar > max(const AD< Scalar > &x, const AD< Scalar > &y)
static int digits10(void)
#define EIGEN_DEVICE_FUNC
static Scalar run(const CppAD::AD< Scalar > &x)
CppAD::AD< Scalar > ADScalar
static CppAD::AD< Base > epsilon(void)
Eigen::Matrix< typename ComplexMatrix::RealScalar, ComplexMatrix::RowsAtCompileTime, ComplexMatrix::ColsAtCompileTime, ComplexMatrix::Options > real(const Eigen::MatrixBase< ComplexMatrix > &complex_mat)
Main pinocchio namespace.
if_then_else_impl< LhsType, RhsType, ThenType, ElseType >::ReturnType if_then_else(const ComparisonOperators op, const LhsType &lhs_value, const RhsType &rhs_value, const ThenType &then_value, const ElseType &else_value)
static ADScalar precision()
AD< Scalar > min(const AD< Scalar > &x, const AD< Scalar > &y)
CppAD::AD< Base > Literal
static CppAD::AD< Base > dummy_precision(void)
CppAD::AD< Base > NonInteger
AD< Base > abs2(const AD< Base > &x)
static CppAD::AD< Base > lowest(void)