18 #ifndef __tsid_python_task_actuation_bounds_hpp__ 19 #define __tsid_python_task_actuation_bounds_hpp__ 32 template <
typename Task>
34 :
public boost::python::def_visitor<
35 TaskActuationBoundsPythonVisitor<Task> > {
36 template <
class PyClass>
39 cl.def(bp::init<std::string, robots::RobotWrapper&>(
40 (bp::arg(
"name"), bp::arg(
"robot")),
"Default Constructor"))
41 .add_property(
"dim", &Task::dim,
"return dimension size")
45 bp::return_value_policy<bp::copy_const_reference>()),
50 bp::args(
"lower",
"upper"))
52 bp::args(
"t",
"q",
"v",
"data"))
54 .add_property(
"getLowerBounds",
57 bp::return_value_policy<bp::copy_const_reference>()))
58 .add_property(
"getUpperBounds",
61 bp::return_value_policy<bp::copy_const_reference>()))
64 static std::string
name(Task&
self) {
65 std::string
name =
self.name();
69 const Eigen::VectorXd&
q,
70 const Eigen::VectorXd&
v,
72 self.compute(t, q, v, data);
84 static const Eigen::VectorXd&
getmask(
const Task&
self) {
87 static void setmask(Task&
self,
const Eigen::VectorXd mask) {
88 return self.mask(mask);
91 return self.getLowerBounds();
94 return self.getUpperBounds();
96 static void setBounds(Task&
self,
const Eigen::VectorXd lower,
97 const Eigen::VectorXd upper) {
98 return self.setBounds(lower, upper);
100 static void expose(
const std::string& class_name) {
101 std::string doc =
"Task info.";
102 bp::class_<Task>(class_name.c_str(), doc.c_str(), bp::no_init)
109 #endif // ifndef __tsid_python_task_actuation_bounds_hpp__ static void setmask(Task &self, const Eigen::VectorXd mask)
static const Eigen::VectorXd & getLowerBounds(const Task &self)
static void expose(const std::string &class_name)
void def(const char *name, Func func)
static const Eigen::VectorXd & getUpperBounds(const Task &self)
void visit(PyClass &cl) const
static std::string name(Task &self)
static void setBounds(Task &self, const Eigen::VectorXd lower, const Eigen::VectorXd upper)
static math::ConstraintInequality compute(Task &self, const double t, const Eigen::VectorXd &q, const Eigen::VectorXd &v, pinocchio::Data &data)
static const Eigen::VectorXd & getmask(const Task &self)
static math::ConstraintInequality getConstraint(const Task &self)