18 #ifndef __tsid_python_task_frames_hpp__
19 #define __tsid_python_task_frames_hpp__
32 template <
typename TaskFrames>
34 :
public boost::python::def_visitor<
35 TaskTwoFramesEqualityPythonVisitor<TaskFrames> > {
36 template <
class PyClass>
40 std::string>((bp::arg(
"name"), bp::arg(
"robot"),
41 bp::arg(
"framename1"), bp::arg(
"framename2")),
42 "Default Constructor"))
43 .add_property(
"dim", &TaskFrames::dim,
"return dimension size")
45 "getDesiredAcceleration",
48 bp::return_value_policy<bp::copy_const_reference>()),
50 .def(
"getAcceleration",
53 .add_property(
"position_error",
56 bp::return_value_policy<bp::copy_const_reference>()))
57 .add_property(
"velocity_error",
60 bp::return_value_policy<bp::copy_const_reference>()))
64 bp::return_value_policy<bp::copy_const_reference>()))
68 bp::return_value_policy<bp::copy_const_reference>()))
74 bp::return_value_policy<bp::copy_const_reference>()),
79 bp::args(
"t",
"q",
"v",
"data"))
82 .add_property(
"frame_id1", &TaskFrames::frame_id1,
"frame id 1 return")
83 .add_property(
"frame_id2", &TaskFrames::frame_id2,
"frame id 2 return")
86 static std::string
name(TaskFrames&
self) {
87 std::string
name =
self.name();
91 const Eigen::VectorXd&
q,
92 const Eigen::VectorXd&
v,
107 return self.getDesiredAcceleration();
110 const Eigen::VectorXd dv) {
111 return self.getAcceleration(
dv);
114 return self.position_error();
117 return self.velocity_error();
119 static const Eigen::VectorXd&
Kp(TaskFrames&
self) {
return self.Kp(); }
120 static const Eigen::VectorXd&
Kd(TaskFrames&
self) {
return self.Kd(); }
121 static void setKp(TaskFrames&
self, const ::Eigen::VectorXd
Kp) {
124 static void setKd(TaskFrames&
self, const ::Eigen::VectorXd Kv) {
127 static void getMask(TaskFrames&
self) {
self.getMask(); }
128 static void setMask(TaskFrames&
self, const ::Eigen::VectorXd mask) {
132 return self.frame_id1();
135 return self.frame_id2();
138 static void expose(
const std::string& class_name) {
139 std::string doc =
"TaskFrames info.";
140 bp::class_<TaskFrames>(
class_name.c_str(), doc.c_str(), bp::no_init)
149 #endif // ifndef __tsid_python_task_frames_hpp__