18 #ifndef __tsid_python_traj_euclidian_hpp__ 19 #define __tsid_python_traj_euclidian_hpp__ 28 template <
typename Traj>
30 :
public boost::python::def_visitor<
31 TrajectoryEuclidianConstantPythonVisitor<Traj> > {
32 template <
class PyClass>
35 cl.def(bp::init<std::string>((bp::arg(
"name")),
36 "Default Constructor with name"))
37 .def(bp::init<std::string, Eigen::VectorXd>(
38 (bp::arg(
"name"), bp::arg(
"reference")),
39 "Default Constructor with name and ref_vec"))
50 .def(
"has_trajectory_ended",
56 self.setReference(ref);
59 return self.computeNext();
63 self.getLastSample(sample);
66 return self.has_trajectory_ended();
69 return self.operator()(
time);
72 static void expose(
const std::string& class_name) {
73 std::string doc =
"Trajectory Euclidian Constant info.";
74 bp::class_<Traj>(class_name.c_str(), doc.c_str(), bp::no_init)
81 #endif // ifndef __tsid_python_traj_euclidian_hpp__ static void setReference(Traj &self, const Eigen::VectorXd &ref)
static trajectories::TrajectorySample computeNext(Traj &self)
static bool has_trajectory_ended(const Traj &self)
void def(const char *name, Func func)
static void getLastSample(const Traj &self, trajectories::TrajectorySample &sample)
void visit(PyClass &cl) const
static trajectories::TrajectorySample getSample(Traj &self, double time)
static void expose(const std::string &class_name)