Skip to content
Snippets Groups Projects
Commit 1c738aee authored by Justin Carpentier's avatar Justin Carpentier Committed by Valenza Florian
Browse files

Correct some missing operator= overaloading - Python modules now compile

parent 2fc8bccc
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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());
}
......
......@@ -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());
}
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment