diff --git a/CMakeLists.txt b/CMakeLists.txt index 971e078d6c095a836920bcaa73e4c61517ab1c83..c16a48728b629ee0a9a9ed1f059b2d515cc4d919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,9 @@ PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} eigenpy) TARGET_LINK_LIBRARIES(${PYWRAP} ${Boost_LIBRARIES} eigenpy) SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/python/${PROJECT_NAME}") +INSTALL(FILES + "${CMAKE_BINARY_DIR}/lib/python/${PROJECT_NAME}/lib${PYWRAP}.so" + DESTINATION ${PYTHON_SITELIB}/${PROJECT_NAME}) # --- INSTALL SCRIPTS SET(PYTHON_FILES diff --git a/src/python/force.hpp b/src/python/force.hpp index 94b8533d0358b8397939e0f648534c7dff399106..c89881093d6e6f031940f4062682c745e1a450a8 100644 --- a/src/python/force.hpp +++ b/src/python/force.hpp @@ -40,7 +40,7 @@ namespace se3 static PyObject* convert(Force const& m) { - Force_fx m_fx = m; + Force_fx m_fx (m); return boost::python::incref(boost::python::object(m_fx).ptr()); } diff --git a/src/python/motion.hpp b/src/python/motion.hpp index 4835e8665f8a9851e6fd941b047697be8970a09a..38ae0872e9b223903547e8366681afbbfdfff0a9 100644 --- a/src/python/motion.hpp +++ b/src/python/motion.hpp @@ -43,7 +43,7 @@ namespace se3 static PyObject* convert(Motion const& m) { - Motion_fx m_fx = m; + Motion_fx m_fx (m); return boost::python::incref(boost::python::object(m_fx).ptr()); } diff --git a/src/spatial/force.hpp b/src/spatial/force.hpp index 7b735a37849e37cd1bc20ee0055d6a7ec56f6c13..314d7988543ae2f8b36033504c3d71c030f0207d 100644 --- a/src/spatial/force.hpp +++ b/src/spatial/force.hpp @@ -59,6 +59,14 @@ namespace se3 void angular(const Vector3 & n) { m_n = n; } // Arithmetic operators + template<typename S2, int O2> + ForceTpl & operator= (const ForceTpl<S2,O2> & other) + { + m_n = other.angular (); + m_f = other.linear (); + return *this; + } + template<typename F6> ForceTpl & operator=(const Eigen::MatrixBase<F6> & phi) { diff --git a/src/spatial/motion.hpp b/src/spatial/motion.hpp index 163ec8b2164c66a681e826cc89c386e48078f8f9..c179e3c70a137ec758585fb3cb46097e5b501cb1 100644 --- a/src/spatial/motion.hpp +++ b/src/spatial/motion.hpp @@ -60,6 +60,14 @@ namespace se3 void linear (const Vector3 & v) { m_v=v; } // Arithmetic operators + template<typename S2, int O2> + MotionTpl & operator= (const MotionTpl<S2,O2> & other) + { + m_w = other.angular (); + m_v = other.linear (); + return *this; + } + template<typename V6> MotionTpl & operator=(const Eigen::MatrixBase<V6> & v) { diff --git a/src/spatial/se3.hpp b/src/spatial/se3.hpp index 74184364b33d802ea52f9148591334979f73e8b2..7d324537e6398acb0dc199144c563fdfbdcaf713 100644 --- a/src/spatial/se3.hpp +++ b/src/spatial/se3.hpp @@ -57,6 +57,14 @@ namespace se3 template<typename S2, int O2> SE3Tpl( const SE3Tpl<S2,O2> clone ) : rot(clone.rotation()),trans(clone.translation()) {} + + template<typename S2, int O2> + SE3Tpl & operator= (const SE3Tpl<S2,O2> & other) + { + rot = other.rotation (); + trans = other.translation (); + return *this; + } const Matrix3 & rotation() const { return rot; } const Vector3 & translation() const { return trans; }