Commit 8ed8a4cb authored by jcarpent's avatar jcarpent
Browse files

[All] Replace definition EIGEN3_{FUTURE,BETA} by internal Eigen macro

parent be395a5c
......@@ -81,22 +81,6 @@ ADD_OPTIONAL_DEPENDENCY("metapod >= 1.0.7")
ADD_OPTIONAL_DEPENDENCY("urdfdom >= 0.2.0")
ADD_OPTIONAL_DEPENDENCY("hpp-fcl >= 0.5.1")
# Spetcial care of Eigen3 greater than 3.2.10
IF(EIGEN3_FOUND)
IF(${EIGEN3_VERSION} VERSION_GREATER "3.2.10")
ADD_DEFINITIONS(-DEIGEN3_FUTURE)
SET(EIGEN3_FUTURE TRUE)
PKG_CONFIG_APPEND_CFLAGS("-DEIGEN3_FUTURE")
IF(${EIGEN3_VERSION} VERSION_LESS "3.3.0")
ADD_DEFINITIONS(-DEIGEN3_BETA_3_2_9x)
SET(EIGEN3_FUTURE TRUE)
PKG_CONFIG_APPEND_CFLAGS("-DEIGEN3_BETA_3_2_9x")
ENDIF(${EIGEN3_VERSION} VERSION_LESS "3.3.0")
ELSE(${EIGEN3_VERSION} VERSION_GREATER "3.2.10")
SET(EIGEN3_FUTURE FALSE)
ENDIF(${EIGEN3_VERSION} VERSION_GREATER "3.2.10")
ENDIF(EIGEN3_FOUND)
# Special care of urdfdom version
IF(URDFDOM_FOUND)
IF(${URDFDOM_VERSION} VERSION_LESS "0.3.0")
......
......@@ -44,7 +44,7 @@ Eigen::ScalarBinaryOpTraits< typename Eigen::internal::traits< D1 >::Scalar, typ
Eigen::internal::scalar_product_traits<typename Eigen::internal::traits< D1 >::Scalar,typename Eigen::internal::traits< D2 >::Scalar>::ReturnType
#endif
#ifdef EIGEN3_BETA_3_2_9x
#if EIGEN_VERSION_AT_LEAST(3,2,90) && !EIGEN_VERSION_AT_LEAST(3,3,0)
namespace se3
{
namespace internal
......
......@@ -165,7 +165,7 @@ namespace se3
/* [CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block) */
template<typename D>
friend
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const Eigen::Product<
Eigen::Transpose<const Vector3>,
typename Eigen::MatrixBase<const D>::template NRowsBlockXpr<3>::Type
......@@ -235,7 +235,7 @@ namespace se3
/* [ABA] Y*S operator (Inertia Y,Constraint S) */
inline
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const Eigen::Product<
Eigen::Block<const Inertia::Matrix6,6,3>,
ConstraintPrismaticUnaligned::Vector3,
......
......@@ -167,7 +167,7 @@ namespace se3
/* [CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block) */
template<typename D>
friend
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const Eigen::Product<
Eigen::Transpose<const Vector3>,
typename Eigen::MatrixBase<const D>::template NRowsBlockXpr<3>::Type
......@@ -243,7 +243,7 @@ namespace se3
/* [ABA] Y*S operator (Inertia Y,Constraint S) */
// inline Eigen::Matrix<double,6,1>
inline
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const Eigen::Product<
Eigen::Block<const Inertia::Matrix6,6,3>,
ConstraintRevoluteUnaligned::Vector3
......
......@@ -160,7 +160,7 @@ namespace se3
ConstraintTranspose(const ConstraintRotationalSubspaceTpl & ref) : ref(ref) {}
template<typename Derived>
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const typename Eigen::Product<
Eigen::Transpose<const Matrix3>,
Eigen::Block<const typename ForceDense<Derived>::Vector6,3,1>
......@@ -179,7 +179,7 @@ namespace se3
/* [CRBA] MatrixBase operator* (Constraint::Transpose S, ForceSet::Block) */
template<typename D>
#ifdef EIGEN3_FUTURE
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const typename Eigen::Product<
typename Eigen::Transpose<const Matrix3>,
typename Eigen::MatrixBase<const D>::template NRowsBlockXpr<3>::Type
......@@ -298,24 +298,24 @@ namespace se3
}
/* [ABA] Y*S operator (Inertia Y,Constraint S) */
// template <typename _Scalar, int _Options>
// inline Eigen::Matrix<_Scalar,6,3,_Options>
//#ifdef EIGEN3_FUTURE
// const typename Eigen::Product<
// const Eigen::template Block<const typename InertiaTpl<_Scalar,_Options>::Matrix6,6,3>,
// const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace::Matrix3
// >
//#else
// const typename Eigen::ProductReturnType<
// const Eigen::template Block<const typename InertiaTpl<_Scalar,_Options>::Matrix6,6,3>,
// const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace::Matrix3
// >::Type
//#endif
// operator*(const typename InertiaTpl<_Scalar,_Options>::Matrix6 & Y,
// const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace & S)
// {
// return Y.template middleCols<3>(Inertia::ANGULAR) * S.S_minimal;
// }
// inline Eigen::Matrix<double,6,3>
template <typename _Scalar, int _Options>
#if EIGEN_VERSION_AT_LEAST(3,2,90)
const typename Eigen::Product<
const Eigen::Block<const Inertia::Matrix6,6,3>,
const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace::Matrix3
>
#else
const typename Eigen::ProductReturnType<
const Eigen::Block<const Inertia::Matrix6,6,3>,
const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace::Matrix3
>::Type
#endif
operator*(const typename InertiaTpl<_Scalar,_Options>::Matrix6 & Y,
const typename JointSphericalZYXTpl<_Scalar,_Options>::ConstraintRotationalSubspace & S)
{
return Y.template middleCols<3>(Inertia::ANGULAR) * S.S_minimal;
}
inline Eigen::Matrix<double,6,3>
operator*(const Inertia::Matrix6 & Y,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment