Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,6 @@ MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/eigenpy")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/eigenpy/solvers")
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_BINARY_DIR}/include/eigenpy)

#FOREACH(header ${HEADERS})
# GET_FILENAME_COMPONENT(headerName ${header} NAME)
# IF(WIN32)
# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
# ${${PROJECT_NAME}_SOURCE_DIR}/${header}
# ${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/)
# ELSE(WIN32)
# execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
# ${${PROJECT_NAME}_SOURCE_DIR}/${header}
# ${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName})
# ENDIF(WIN32)
# INSTALL(FILES ${${PROJECT_NAME}_SOURCE_DIR}/${header}
# DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}
# PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
#ENDFOREACH(header)

SET(${PROJECT_NAME}_HEADERS)
FOREACH(header ${HEADERS})
GET_FILENAME_COMPONENT(headerName ${header} NAME)
Expand Down
3 changes: 3 additions & 0 deletions src/angle-axis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
*/

#include "eigenpy/memory.hpp"
#include "eigenpy/geometry.hpp"
#include "eigenpy/angle-axis.hpp"

EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(Eigen::AngleAxisd)

namespace eigenpy
{
void exposeAngleAxis()
Expand Down
9 changes: 1 addition & 8 deletions src/eigenpy.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014, Nicolas Mansard, LAAS-CNRS
* Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
Expand All @@ -22,13 +22,6 @@

namespace eigenpy
{
typedef UnalignedEquivalent<Eigen::MatrixXd>::type MatrixXd_fx;
typedef UnalignedEquivalent<Eigen::Matrix3d>::type Matrix3d_fx;
typedef UnalignedEquivalent<Eigen::Matrix4d>::type Matrix4d_fx;
typedef UnalignedEquivalent<Eigen::VectorXd>::type VectorXd_fx;
typedef UnalignedEquivalent<Eigen::Vector3d>::type Vector3d_fx;
typedef UnalignedEquivalent<Eigen::Vector4d>::type Vector4d_fx;

/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void enableEigenPy();

Expand Down
22 changes: 1 addition & 21 deletions src/fwd.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2014, Nicolas Mansard, LAAS-CNRS
* Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
Expand All @@ -24,24 +24,4 @@
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#endif

namespace eigenpy
{
template<typename D, typename Scalar = typename D::Scalar>
struct UnalignedEquivalent
{
typedef Eigen::MatrixBase<D> MatType;
typedef Eigen::Matrix<Scalar,
D::RowsAtCompileTime,
D::ColsAtCompileTime,
#ifndef EIGENPY_ALIGNED
D::Options | Eigen::DontAlign,
#else
D::Options,
#endif
D::MaxRowsAtCompileTime,
D::MaxColsAtCompileTime> type;
};

} // namespace eigenpy

#endif // ifndef __eigenpy_fwd_hpp__
3 changes: 3 additions & 0 deletions src/quaternion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
*/

#include "eigenpy/memory.hpp"
#include "eigenpy/geometry.hpp"
#include "eigenpy/quaternion.hpp"

EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(Eigen::Quaterniond)

namespace eigenpy
{
void exposeQuaternion()
Expand Down
5 changes: 4 additions & 1 deletion src/quaternion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace eigenpy
.def("_transformVector",&Quaternion::_transformVector,bp::arg("vector"),"Rotation of a vector by a quaternion.")
.def("vec",&vec,"Returns a vector expression of the imaginary part (x,y,z).")
.def("angularDistance",&Quaternion::template angularDistance<Quaternion>,"Returns the angle (in radian) between two rotations.")
.def("slerp",&Quaternion::template slerp<Quaternion>,bp::args("t","other"),
.def("slerp",&slerp,bp::args("t","other"),
"Returns the spherical linear interpolation between the two quaternions *this and other at the parameter t in [0;1].")

/* --- Operators --- */
Expand Down Expand Up @@ -205,6 +205,9 @@ namespace eigenpy

return ss.str();
}

static Quaternion slerp(const Quaternion & self, const Scalar t, const Quaternion & other)
{ return self.slerp(t,other); }

public:

Expand Down
2 changes: 1 addition & 1 deletion src/solvers/BasicPreconditioners.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace eigenpy
}
};

#if EIGEN_VERSION_AT_LEAST(3,3,0)
#if EIGEN_VERSION_AT_LEAST(3,3,5)
template<typename Scalar>
struct LeastSquareDiagonalPreconditionerVisitor : PreconditionerBaseVisitor<Eigen::LeastSquareDiagonalPreconditioner<Scalar> >
{
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/preconditioners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace eigenpy
using namespace Eigen;

DiagonalPreconditionerVisitor<double>::expose();
#if EIGEN_VERSION_AT_LEAST(3,3,0)
#if EIGEN_VERSION_AT_LEAST(3,3,5)
LeastSquareDiagonalPreconditionerVisitor<double>::expose();
#endif
IdentityPreconditionerVisitor::expose();
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/solvers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "eigenpy/solvers/solvers.hpp"
#include "eigenpy/solvers/ConjugateGradient.hpp"

#if EIGEN_VERSION_AT_LEAST(3,3,0)
#if EIGEN_VERSION_AT_LEAST(3,3,5)
#include "eigenpy/solvers/LeastSquaresConjugateGradient.hpp"
#endif

Expand All @@ -27,7 +27,7 @@ namespace eigenpy
{
using namespace Eigen;
ConjugateGradientVisitor< ConjugateGradient<MatrixXd,Lower|Upper> >::expose();
#if EIGEN_VERSION_AT_LEAST(3,3,0)
#if EIGEN_VERSION_AT_LEAST(3,3,5)
LeastSquaresConjugateGradientVisitor< LeastSquaresConjugateGradient<MatrixXd, LeastSquareDiagonalPreconditionerFix<MatrixXd::Scalar> > >::expose();
#endif

Expand Down
2 changes: 1 addition & 1 deletion unittest/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Eigen::Matrix3d naturals(bool verbose)
}

template<typename MatType>
Eigen::MatrixXd reflex(const typename eigenpy::UnalignedEquivalent<MatType>::type & M, bool verbose)
Eigen::MatrixXd reflex(const MatType & M, bool verbose)
{
if(verbose)
std::cout << "EigenMat = " << M << std::endl;
Expand Down