Unverified Commit 8166fc00 authored by Andrea Del Prete's avatar Andrea Del Prete Committed by GitHub
Browse files

Merge pull request #36 from jviereck/jviereck_expose_se3_use_local_frame

Expose TaskSE3Equality::useLocalFrame to python
parents 5f7453c5 768a903a
......@@ -31,16 +31,16 @@
namespace tsid
{
namespace python
{
{
namespace bp = boost::python;
template<typename TaskSE3>
struct TaskSE3EqualityPythonVisitor
: public boost::python::def_visitor< TaskSE3EqualityPythonVisitor<TaskSE3> >
{
template<class PyClass>
template<class PyClass>
void visit(PyClass& cl) const
{
......@@ -62,6 +62,7 @@ namespace tsid
.def("setKd", &TaskSE3EqualityPythonVisitor::setKd, bp::arg("Kd"))
.def("compute", &TaskSE3EqualityPythonVisitor::compute, bp::args("t", "q", "v", "data"))
.def("getConstraint", &TaskSE3EqualityPythonVisitor::getConstraint)
.def("useLocalFrame", &TaskSE3EqualityPythonVisitor::useLocalFrame, bp::arg("local_frame"))
.add_property("frame_id", &TaskSE3::frame_id, "frame id return")
.add_property("name", &TaskSE3EqualityPythonVisitor::name)
;
......@@ -79,6 +80,9 @@ namespace tsid
math::ConstraintEquality cons(self.getConstraint().name(), self.getConstraint().matrix(), self.getConstraint().vector());
return cons;
}
static void useLocalFrame (TaskSE3 & self, const bool local_frame) {
self.useLocalFrame(local_frame);
}
static void setReference(TaskSE3 & self, trajectories::TrajectorySample & ref){
self.setReference(ref);
}
......@@ -105,13 +109,13 @@ namespace tsid
}
static const Eigen::VectorXd & velocity_ref (const TaskSE3 & self){
return self.velocity_ref();
}
}
static const Eigen::VectorXd & Kp (TaskSE3 & self){
return self.Kp();
}
}
static const Eigen::VectorXd & Kd (TaskSE3 & self){
return self.Kd();
}
}
static void setKp (TaskSE3 & self, const::Eigen::VectorXd Kp){
return self.Kp(Kp);
}
......
Supports Markdown
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