diff --git a/src/python/force.hpp b/src/python/force.hpp index b89717a68cce0a0214848126e96b88888d64d36a..52852ff0dadc4b0549fe127c1bb168d1331b1603 100644 --- a/src/python/force.hpp +++ b/src/python/force.hpp @@ -70,6 +70,7 @@ namespace se3 ((bp::arg("linear"),bp::arg("angular")), "Initialize from linear and angular components (dont mix the order).")) .def(bp::init<Vector6_fx>((bp::arg("Vector 6d")),"Init from vector 6 [f,n]")) + .def(bp::init<Force_fx>((bp::arg("other")),"Copy constructor.")) .add_property("linear",&ForcePythonVisitor::getLinear,&ForcePythonVisitor::setLinear) .add_property("angular",&ForcePythonVisitor::getAngular,&ForcePythonVisitor::setAngular) diff --git a/src/python/inertia.hpp b/src/python/inertia.hpp index e93404bfe3cfa39af07873c43a0f59028cb48eda..40286da1314013f409a80e9ce3dd740f46e1ee13 100644 --- a/src/python/inertia.hpp +++ b/src/python/inertia.hpp @@ -75,6 +75,7 @@ namespace se3 bp::default_call_policies(), (bp::arg("mass"),bp::arg("lever"),bp::arg("inertia"))), "Initialize from mass, lever and 3d inertia.") + .def(bp::init<Inertia_fx>((bp::arg("other")),"Copy constructor.")) .add_property("mass", &InertiaPythonVisitor::getMass, &InertiaPythonVisitor::setMass) .add_property("lever", &InertiaPythonVisitor::getLever, &InertiaPythonVisitor::setLever) diff --git a/src/python/motion.hpp b/src/python/motion.hpp index 3bf5f7a1ac8a0166b4998ffc2b802048ae462a89..d0be176ce44f1ffef1edc1073bdf6276cf3d7a0f 100644 --- a/src/python/motion.hpp +++ b/src/python/motion.hpp @@ -73,6 +73,7 @@ namespace se3 ((bp::arg("linear"),bp::arg("angular")), "Initialize from linear and angular components (dont mix the order).")) .def(bp::init<Vector6_fx>((bp::arg("Vector 6d")),"Init from vector 6 [v,w]")) + .def(bp::init<Motion_fx>((bp::arg("other")),"Copy constructor.")) .add_property("linear",&MotionPythonVisitor::getLinear,&MotionPythonVisitor::setLinear) .add_property("angular",&MotionPythonVisitor::getAngular,&MotionPythonVisitor::setAngular) diff --git a/src/python/se3.hpp b/src/python/se3.hpp index ec312c288d021ec08e80817a95757d76bf187e4f..58ca49ed83c6a7ff81aa34f21d3c5629f81ea5ee 100644 --- a/src/python/se3.hpp +++ b/src/python/se3.hpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2015 CNRS +// Copyright (c) 2015-2016 CNRS // Copyright (c) 2016 Wandercraft, 86 rue de Paris 91400 Orsay, France. // // This file is part of Pinocchio @@ -67,13 +67,12 @@ namespace se3 template<class PyClass> void visit(PyClass& cl) const { - cl - .def(bp::init<Matrix3_fx,Vector3_fx> - ((bp::arg("Rotation"),bp::arg("translation")), - "Initialize from rotation and translation.")) - .def(bp::init<int> - ((bp::arg("trivial arg (should be 1)")), - "Init to identity.")) + cl + .def(bp::init<Matrix3_fx,Vector3_fx> + ((bp::arg("Rotation"),bp::arg("translation")), + "Initialize from rotation and translation.")) + .def(bp::init<int>((bp::arg("trivial arg (should be 1)")),"Init to identity.")) + .def(bp::init<SE3_fx> ((bp::arg("other")), "Copy constructor.")) .add_property("rotation",&SE3PythonVisitor::getRotation,&SE3PythonVisitor::setRotation) .add_property("translation",&SE3PythonVisitor::getTranslation,&SE3PythonVisitor::setTranslation)