18 #ifndef __tsid_python_task_am_hpp__ 19 #define __tsid_python_task_am_hpp__ 32 template <
typename TaskAM>
34 :
public boost::python::def_visitor<TaskAMEqualityPythonVisitor<TaskAM> > {
35 template <
class PyClass>
38 cl.def(bp::init<std::string, robots::RobotWrapper&>(
39 (bp::arg(
"name"), bp::arg(
"robot")),
"Default Constructor"))
40 .add_property(
"dim", &TaskAM::dim,
"return dimension size")
44 "getDesiredMomentumDerivative",
47 bp::return_value_policy<bp::copy_const_reference>()),
51 .add_property(
"momentum_error",
54 bp::return_value_policy<bp::copy_const_reference>()))
55 .add_property(
"momentum",
58 bp::return_value_policy<bp::copy_const_reference>()))
59 .add_property(
"momentum_ref",
62 bp::return_value_policy<bp::copy_const_reference>()))
63 .add_property(
"dmomentum_ref",
66 bp::return_value_policy<bp::copy_const_reference>()))
70 bp::return_value_policy<bp::copy_const_reference>()))
74 bp::return_value_policy<bp::copy_const_reference>()))
78 bp::args(
"t",
"q",
"v",
"data"))
82 static std::string
name(TaskAM&
self) {
83 std::string
name =
self.name();
87 const Eigen::VectorXd&
q,
88 const Eigen::VectorXd&
v,
90 self.compute(t, q, v, data);
104 self.setReference(ref);
107 const TaskAM&
self) {
108 return self.getDesiredMomentumDerivative();
111 return self.getdMomentum(dv);
114 return self.momentum_error();
116 static const Eigen::Vector3d&
momentum(
const TaskAM&
self) {
117 return self.momentum();
120 return self.momentum_ref();
123 return self.dmomentum_ref();
125 static const Eigen::Vector3d&
Kp(TaskAM&
self) {
return self.Kp(); }
126 static const Eigen::Vector3d&
Kd(TaskAM&
self) {
return self.Kd(); }
127 static void setKp(TaskAM&
self, const ::Eigen::VectorXd
Kp) {
130 static void setKd(TaskAM&
self, const ::Eigen::VectorXd Kv) {
133 static void expose(
const std::string& class_name) {
134 std::string doc =
"TaskAMEqualityPythonVisitor info.";
135 bp::class_<TaskAM>(class_name.c_str(), doc.c_str(), bp::no_init)
142 #endif // ifndef __tsid_python_task_am_hpp__
static Eigen::Vector3d getdMomentum(TaskAM &self, const Eigen::VectorXd dv)
static const Eigen::Vector3d & getDesiredMomentumDerivative(const TaskAM &self)
static const Eigen::Vector3d & momentum_error(const TaskAM &self)
static const Eigen::VectorXd & dmomentum_ref(const TaskAM &self)
void def(const char *name, Func func)
static const Eigen::Vector3d & Kd(TaskAM &self)
static void setReference(TaskAM &self, const trajectories::TrajectorySample &ref)
static void setKp(TaskAM &self, const ::Eigen::VectorXd Kp)
static math::ConstraintEquality getConstraint(const TaskAM &self)
static const Eigen::VectorXd & momentum_ref(const TaskAM &self)
static const Eigen::Vector3d & momentum(const TaskAM &self)
static std::string name(TaskAM &self)
static void expose(const std::string &class_name)
static void setKd(TaskAM &self, const ::Eigen::VectorXd Kv)
static math::ConstraintEquality compute(TaskAM &self, const double t, const Eigen::VectorXd &q, const Eigen::VectorXd &v, pinocchio::Data &data)
static const Eigen::Vector3d & Kp(TaskAM &self)
void visit(PyClass &cl) const