Commit 98c3e457 authored by Guilhem Saurel's avatar Guilhem Saurel

[wip/{py-,}tsid] Update to v1.2.2

Changes since v1.2.1:
- add angular momentum equality task
- update to pinocchio changes
- Python 3 compatibility
- add some documentation
- fix python issue

Packaging changes:
- update py-tsid patches aa & ac
- remove other patches, applied upstream
parent 4cf8b3d2
......@@ -4,8 +4,7 @@
ORG= stack-of-tasks
NAME= tsid
VERSION= 1.2.1
PKGREVISION= 1
VERSION= 1.2.2
CATEGORIES= wip
COMMENT= Efficient Inverse Dynamics based on Pinocchio (python bindings)
......
......@@ -16,6 +16,7 @@ include/tsid/bindings/python/solvers/expose-solvers.hpp
include/tsid/bindings/python/solvers/solver-HQP-eiquadprog.hpp
include/tsid/bindings/python/tasks/expose-tasks.hpp
include/tsid/bindings/python/tasks/task-actuation-bounds.hpp
include/tsid/bindings/python/tasks/task-am-equality.hpp
include/tsid/bindings/python/tasks/task-com-equality.hpp
include/tsid/bindings/python/tasks/task-joint-bounds.hpp
include/tsid/bindings/python/tasks/task-joint-posture.hpp
......
SHA1 (tsid-1.2.1.tar.gz) = de3861c98d40270fefed74062ac9ba03cb50fb65
RMD160 (tsid-1.2.1.tar.gz) = 031f4ac6fd593b85bb7ee0051c1d13c2cccbfe59
Size (tsid-1.2.1.tar.gz) = 9247070 bytes
SHA1 (patch-aa) = 5794c89861c6a84d47428939af6d19da36930631
SHA1 (patch-ab) = 4af606a78e78c4e14c489e0b86b9eb4d8aca03f3
SHA1 (patch-ac) = c5625ba8c746eb5e04d63e258171d4f947aa90ed
SHA1 (patch-ad) = 50a7fa80e9dd0e5d7d4a8f07716119a4f3149011
SHA1 (patch-ae) = 0361dfe851401d831c1a150c246ef1ec5d044969
SHA1 (tsid-1.2.2.tar.gz) = 15b2b2bd747bac8c88ffb52434d725f740facf0d
RMD160 (tsid-1.2.2.tar.gz) = b921a355d6ee06e5e8ebfbd2e06bbc8172db8da2
Size (tsid-1.2.2.tar.gz) = 9414313 bytes
SHA1 (patch-aa) = ade66fdc5a9567b6113647d8437db86670444dc7
SHA1 (patch-ac) = cbb0d033e963f3117cd74eaff26761a6cc3f281a
--- CMakeLists.txt.orig 2019-09-16 11:12:22.000000000 +0200
+++ CMakeLists.txt 2019-09-16 11:39:57.606237235 +0200
@@ -189,13 +189,9 @@
--- CMakeLists.txt.orig 2020-03-01 11:46:57.000000000 +0100
+++ CMakeLists.txt 2020-03-01 14:13:37.990434348 +0100
@@ -193,13 +193,9 @@
LIST(APPEND HEADERS_FULL_PATH "${CMAKE_SOURCE_DIR}/${header}")
GET_FILENAME_COMPONENT(headerName ${header} NAME)
GET_FILENAME_COMPONENT(headerPath ${header} PATH)
......
--- CMakeLists.txt.orig 2019-09-16 12:30:40.000000000 +0200
+++ CMakeLists.txt 2019-09-16 12:30:50.709636368 +0200
@@ -77,7 +77,6 @@
# Fail-safe support for catkin-ized pinocchio:
# - If catkin-based pinocchio is installed it runs the CFG_EXTRAS to set up the Pinocchio preprocessor directives
# - If it isn't, nothing happens and the subsequent pkg-config check takes care of everything.
-find_package(catkin QUIET COMPONENTS pinocchio)
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.0.0")
--- CMakeLists.txt.orig 2019-10-09 16:24:46.000000000 +0200
+++ CMakeLists.txt 2019-10-09 16:31:36.347666937 +0200
@@ -79,6 +79,7 @@
# - If it isn't, nothing happens and the subsequent pkg-config check takes care of everything.
--- CMakeLists.txt.orig 2020-03-01 11:46:57.000000000 +0100
+++ CMakeLists.txt 2020-03-01 14:17:32.940105405 +0100
@@ -83,6 +83,7 @@
#find_package(catkin QUIET COMPONENTS pinocchio)
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.0.0")
+ADD_REQUIRED_DEPENDENCY("tsid >= 1.2.1")
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.2.0")
+ADD_REQUIRED_DEPENDENCY("tsid >= 1.2.2")
SET(BOOST_REQUIERED_COMPONENTS filesystem system)
SET(BOOST_BUILD_COMPONENTS unit_test_framework)
--- bindings/python/CMakeLists.txt.orig 2019-09-16 11:12:22.000000000 +0200
+++ bindings/python/CMakeLists.txt 2019-10-09 16:36:03.733286369 +0200
--- bindings/python/CMakeLists.txt.orig 2020-03-01 11:46:57.000000000 +0100
+++ bindings/python/CMakeLists.txt 2020-03-01 14:17:43.320002318 +0100
@@ -112,6 +112,7 @@
ADD_SOURCE_GROUP(${PYWRAP}_SOURCES)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} eigenpy)
......@@ -18,8 +18,8 @@
TARGET_LINK_LIBRARIES(${PYWRAP} ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(${PYWRAP})
--- unittest/CMakeLists.txt.orig 2019-09-16 11:12:22.000000000 +0200
+++ unittest/CMakeLists.txt 2019-10-09 16:39:06.392569781 +0200
--- unittest/CMakeLists.txt.orig 2020-03-01 11:46:57.000000000 +0100
+++ unittest/CMakeLists.txt 2020-03-01 14:17:55.651879822 +0100
@@ -41,6 +41,7 @@
FOREACH(PKG ${PKGS})
PKG_CONFIG_USE_DEPENDENCY(${NAME} ${PKG})
......
--- bindings/python/robots/robot-wrapper.hpp
+++ bindings/python/robots/robot-wrapper.hpp
@@ -23,15 +23,17 @@
#include <string>
#include <eigenpy/eigenpy.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
+#include <boost/python/make_constructor.hpp>
+#include <pinocchio/bindings/python/parsers/parsers.hpp>
#include "tsid/robots/robot-wrapper.hpp"
namespace tsid
{
namespace python
- {
+ {
namespace bp = boost::python;
-
+
template<typename Robot>
struct RobotPythonVisitor
: public boost::python::def_visitor< RobotPythonVisitor<Robot> >
@@ -39,18 +41,19 @@ namespace tsid
typedef std::vector<std::string> std_vec;
typedef Eigen::Matrix<double,3,Eigen::Dynamic> Matrix3x;
- template<class PyClass>
+ template<class PyClass >
void visit(PyClass& cl) const
{
cl
.def(bp::init<std::string, std_vec, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("verbose")), "Default constructor without RootJoint."))
.def(bp::init<pinocchio::Model, bool>((bp::arg("Pinocchio Model"), bp::arg("verbose")), "Default constructor from pinocchio model"))
- .def(bp::init<std::string, std_vec, pinocchio::JointModelVariant, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
+ .def(bp::init<std::string, std_vec, pinocchio::JointModelVariant &, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
+ .def("__init__",bp::make_constructor(RobotPythonVisitor<Robot> ::makeClass))
.add_property("nq", &Robot::nq)
.add_property("nv", &Robot::nv)
.add_property("na", &Robot::na)
-
+
.def("model", &RobotPythonVisitor::model)
.def("data", &RobotPythonVisitor::data)
@@ -58,18 +61,18 @@ namespace tsid
.add_property("gear_ratios", &RobotPythonVisitor::gear_ratios)
.def("set_rotor_inertias", &RobotPythonVisitor::set_rotor_inertias, bp::arg("inertia vector"))
.def("set_gear_ratios", &RobotPythonVisitor::set_gear_ratios, bp::arg("gear ratio vector"))
-
+
.def("computeAllTerms", &RobotPythonVisitor::computeAllTerms, bp::args("data", "q", "v"), "compute all dynamics")
.def("com", &RobotPythonVisitor::com, bp::arg("data"))
.def("com_vel", &RobotPythonVisitor::com_vel, bp::arg("data"))
.def("com_acc", &RobotPythonVisitor::com_acc, bp::arg("data"))
.def("Jcom", &RobotPythonVisitor::Jcom, bp::arg("data"))
- .def("mass", &RobotPythonVisitor::mass, bp::arg("data"))
+ .def("mass", &RobotPythonVisitor::mass, bp::arg("data"))
.def("nonLinearEffect", &RobotPythonVisitor::nonLinearEffects, bp::arg("data"))
- .def("position", &RobotPythonVisitor::position, bp::args("data", "index"))
+ .def("position", &RobotPythonVisitor::position, bp::args("data", "index"))
.def("velocity", &RobotPythonVisitor::velocity, bp::args("data", "index"))
.def("acceleration", &RobotPythonVisitor::acceleration, bp::args("data", "index"))
-
+
.def("framePosition", &RobotPythonVisitor::framePosition, bp::args("data", "index"))
.def("frameVelocity", &RobotPythonVisitor::frameVelocity, bp::args("data", "index"))
.def("frameAcceleration", &RobotPythonVisitor::frameAcceleration, bp::args("data", "index"))
@@ -77,9 +80,27 @@ namespace tsid
.def("frameVelocityWorldOriented", &RobotPythonVisitor::frameVelocityWorldOriented, bp::args("data", "index"))
.def("frameAccelerationWorldOriented", &RobotPythonVisitor::frameAccelerationWorldOriented, bp::args("data", "index"))
.def("frameClassicAccelerationWorldOriented", &RobotPythonVisitor::frameClassicAccelerationWorldOriented, bp::args("data", "index"))
-
+
;
}
+
+ static boost::shared_ptr<Robot> makeClass(const std::string &filename,
+ const std::vector<std::string>
+ &stdvec,
+ bp::object & bpObject,
+ bool verbose)
+ {
+ std::cout << "Before extraction " << std::endl;
+ pinocchio::JointModelFreeFlyer root_joint =
+ bp::extract<pinocchio::JointModelFreeFlyer>(bpObject)();
+ std::cout << "After extraction " << std::endl;
+ boost::shared_ptr<Robot> p(new tsid::robots::RobotWrapper(filename,
+ stdvec,
+ root_joint,
+ verbose));
+ return p;
+ }
+
static pinocchio::Model model (const Robot & self){
return self.model();
}
@@ -108,10 +129,10 @@ namespace tsid
}
static Eigen::Vector3d com_acc (const Robot & self, const pinocchio::Data & data){
return self.com_acc(data);
- }
+ }
static Matrix3x Jcom (const Robot & self, const pinocchio::Data & data){
return self.Jcom(data);
- }
+ }
static void computeAllTerms (const Robot & self, pinocchio::Data & data, const Eigen::VectorXd & q, const Eigen::VectorXd & v){
self.computeAllTerms(data, q, v);
}
--
2.7.4
--- bindings/python/robots/robot-wrapper.hpp
+++ bindings/python/robots/robot-wrapper.hpp
@@ -90,10 +90,8 @@ namespace tsid
bp::object & bpObject,
bool verbose)
{
- std::cout << "Before extraction " << std::endl;
pinocchio::JointModelFreeFlyer root_joint =
bp::extract<pinocchio::JointModelFreeFlyer>(bpObject)();
- std::cout << "After extraction " << std::endl;
boost::shared_ptr<Robot> p(new tsid::robots::RobotWrapper(filename,
stdvec,
root_joint,
--
2.7.4
......@@ -4,8 +4,7 @@
ORG= stack-of-tasks
NAME= tsid
VERSION= 1.2.1
PKGREVISION= 1
VERSION= 1.2.2
CATEGORIES= wip
COMMENT= Efficient Inverse Dynamics based on Pinocchio
......
......@@ -36,6 +36,7 @@ include/tsid/tasks/fwd.hpp
include/tsid/tasks/task-actuation-bounds.hpp
include/tsid/tasks/task-actuation-equality.hpp
include/tsid/tasks/task-actuation.hpp
include/tsid/tasks/task-angular-momentum-equality.hpp
include/tsid/tasks/task-base.hpp
include/tsid/tasks/task-com-equality.hpp
include/tsid/tasks/task-contact-force-equality.hpp
......
SHA1 (tsid-1.2.1.tar.gz) = de3861c98d40270fefed74062ac9ba03cb50fb65
RMD160 (tsid-1.2.1.tar.gz) = 031f4ac6fd593b85bb7ee0051c1d13c2cccbfe59
Size (tsid-1.2.1.tar.gz) = 9247070 bytes
SHA1 (patch-aa) = 57a8ca91b4b2c7fba35f927ec1083523a26dcc05
SHA1 (patch-ab) = 50a7fa80e9dd0e5d7d4a8f07716119a4f3149011
SHA1 (patch-ac) = 0361dfe851401d831c1a150c246ef1ec5d044969
SHA1 (tsid-1.2.2.tar.gz) = 15b2b2bd747bac8c88ffb52434d725f740facf0d
RMD160 (tsid-1.2.2.tar.gz) = b921a355d6ee06e5e8ebfbd2e06bbc8172db8da2
Size (tsid-1.2.2.tar.gz) = 9414313 bytes
--- CMakeLists.txt.orig 2019-09-16 11:12:22.000000000 +0200
+++ CMakeLists.txt 2019-09-16 12:30:05.942033968 +0200
@@ -77,7 +77,6 @@
# Fail-safe support for catkin-ized pinocchio:
# - If catkin-based pinocchio is installed it runs the CFG_EXTRAS to set up the Pinocchio preprocessor directives
# - If it isn't, nothing happens and the subsequent pkg-config check takes care of everything.
-find_package(catkin QUIET COMPONENTS pinocchio)
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.0.0")
--- bindings/python/robots/robot-wrapper.hpp
+++ bindings/python/robots/robot-wrapper.hpp
@@ -23,15 +23,17 @@
#include <string>
#include <eigenpy/eigenpy.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
+#include <boost/python/make_constructor.hpp>
+#include <pinocchio/bindings/python/parsers/parsers.hpp>
#include "tsid/robots/robot-wrapper.hpp"
namespace tsid
{
namespace python
- {
+ {
namespace bp = boost::python;
-
+
template<typename Robot>
struct RobotPythonVisitor
: public boost::python::def_visitor< RobotPythonVisitor<Robot> >
@@ -39,18 +41,19 @@ namespace tsid
typedef std::vector<std::string> std_vec;
typedef Eigen::Matrix<double,3,Eigen::Dynamic> Matrix3x;
- template<class PyClass>
+ template<class PyClass >
void visit(PyClass& cl) const
{
cl
.def(bp::init<std::string, std_vec, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("verbose")), "Default constructor without RootJoint."))
.def(bp::init<pinocchio::Model, bool>((bp::arg("Pinocchio Model"), bp::arg("verbose")), "Default constructor from pinocchio model"))
- .def(bp::init<std::string, std_vec, pinocchio::JointModelVariant, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
+ .def(bp::init<std::string, std_vec, pinocchio::JointModelVariant &, bool>((bp::arg("filename"), bp::arg("package_dir"), bp::arg("roottype"), bp::arg("verbose")), "Default constructor without RootJoint."))
+ .def("__init__",bp::make_constructor(RobotPythonVisitor<Robot> ::makeClass))
.add_property("nq", &Robot::nq)
.add_property("nv", &Robot::nv)
.add_property("na", &Robot::na)
-
+
.def("model", &RobotPythonVisitor::model)
.def("data", &RobotPythonVisitor::data)
@@ -58,18 +61,18 @@ namespace tsid
.add_property("gear_ratios", &RobotPythonVisitor::gear_ratios)
.def("set_rotor_inertias", &RobotPythonVisitor::set_rotor_inertias, bp::arg("inertia vector"))
.def("set_gear_ratios", &RobotPythonVisitor::set_gear_ratios, bp::arg("gear ratio vector"))
-
+
.def("computeAllTerms", &RobotPythonVisitor::computeAllTerms, bp::args("data", "q", "v"), "compute all dynamics")
.def("com", &RobotPythonVisitor::com, bp::arg("data"))
.def("com_vel", &RobotPythonVisitor::com_vel, bp::arg("data"))
.def("com_acc", &RobotPythonVisitor::com_acc, bp::arg("data"))
.def("Jcom", &RobotPythonVisitor::Jcom, bp::arg("data"))
- .def("mass", &RobotPythonVisitor::mass, bp::arg("data"))
+ .def("mass", &RobotPythonVisitor::mass, bp::arg("data"))
.def("nonLinearEffect", &RobotPythonVisitor::nonLinearEffects, bp::arg("data"))
- .def("position", &RobotPythonVisitor::position, bp::args("data", "index"))
+ .def("position", &RobotPythonVisitor::position, bp::args("data", "index"))
.def("velocity", &RobotPythonVisitor::velocity, bp::args("data", "index"))
.def("acceleration", &RobotPythonVisitor::acceleration, bp::args("data", "index"))
-
+
.def("framePosition", &RobotPythonVisitor::framePosition, bp::args("data", "index"))
.def("frameVelocity", &RobotPythonVisitor::frameVelocity, bp::args("data", "index"))
.def("frameAcceleration", &RobotPythonVisitor::frameAcceleration, bp::args("data", "index"))
@@ -77,9 +80,27 @@ namespace tsid
.def("frameVelocityWorldOriented", &RobotPythonVisitor::frameVelocityWorldOriented, bp::args("data", "index"))
.def("frameAccelerationWorldOriented", &RobotPythonVisitor::frameAccelerationWorldOriented, bp::args("data", "index"))
.def("frameClassicAccelerationWorldOriented", &RobotPythonVisitor::frameClassicAccelerationWorldOriented, bp::args("data", "index"))
-
+
;
}
+
+ static boost::shared_ptr<Robot> makeClass(const std::string &filename,
+ const std::vector<std::string>
+ &stdvec,
+ bp::object & bpObject,
+ bool verbose)
+ {
+ std::cout << "Before extraction " << std::endl;
+ pinocchio::JointModelFreeFlyer root_joint =
+ bp::extract<pinocchio::JointModelFreeFlyer>(bpObject)();
+ std::cout << "After extraction " << std::endl;
+ boost::shared_ptr<Robot> p(new tsid::robots::RobotWrapper(filename,
+ stdvec,
+ root_joint,
+ verbose));
+ return p;
+ }
+
static pinocchio::Model model (const Robot & self){
return self.model();
}
@@ -108,10 +129,10 @@ namespace tsid
}
static Eigen::Vector3d com_acc (const Robot & self, const pinocchio::Data & data){
return self.com_acc(data);
- }
+ }
static Matrix3x Jcom (const Robot & self, const pinocchio::Data & data){
return self.Jcom(data);
- }
+ }
static void computeAllTerms (const Robot & self, pinocchio::Data & data, const Eigen::VectorXd & q, const Eigen::VectorXd & v){
self.computeAllTerms(data, q, v);
}
--
2.7.4
--- bindings/python/robots/robot-wrapper.hpp
+++ bindings/python/robots/robot-wrapper.hpp
@@ -90,10 +90,8 @@ namespace tsid
bp::object & bpObject,
bool verbose)
{
- std::cout << "Before extraction " << std::endl;
pinocchio::JointModelFreeFlyer root_joint =
bp::extract<pinocchio::JointModelFreeFlyer>(bpObject)();
- std::cout << "After extraction " << std::endl;
boost::shared_ptr<Robot> p(new tsid::robots::RobotWrapper(filename,
stdvec,
root_joint,
--
2.7.4
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