tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
trajectory-se3.hpp
Go to the documentation of this file.
1//
2// Copyright (c) 2018 CNRS
3//
4
5#ifndef __tsid_python_traj_se3_hpp__
6#define __tsid_python_traj_se3_hpp__
7
9
11namespace tsid {
12namespace python {
13namespace bp = boost::python;
14
15template <typename TrajSE3>
17 : public boost::python::def_visitor<
18 TrajectorySE3ConstantPythonVisitor<TrajSE3> > {
19 template <class PyClass>
20
21 void visit(PyClass& cl) const {
22 cl.def(bp::init<std::string>((bp::arg("name")),
23 "Default Constructor with name"))
24 .def(bp::init<std::string, pinocchio::SE3>(
25 (bp::arg("name"), bp::arg("reference")),
26 "Default Constructor with name and ref_vec"))
27
28 .add_property("size", &TrajSE3::size)
30 bp::arg("M_ref"))
32 .def("getLastSample",
34 bp::arg("sample"))
35 .def("has_trajectory_ended",
38 bp::arg("time"));
39 }
40 static void setReference(TrajSE3& self, const pinocchio::SE3& ref) {
41 self.setReference(ref);
42 }
44 return self.computeNext();
45 }
46 static void getLastSample(const TrajSE3& self,
48 self.getLastSample(sample);
49 }
50 static bool has_trajectory_ended(const TrajSE3& self) {
51 return self.has_trajectory_ended();
52 }
53 static trajectories::TrajectorySample getSample(TrajSE3& self, double time) {
54 return self.operator()(time);
55 }
56
57 static void expose(const std::string& class_name) {
58 std::string doc = "Trajectory SE3 Constant info.";
59 bp::class_<TrajSE3>(class_name.c_str(), doc.c_str(), bp::no_init)
61 }
62};
63} // namespace python
64} // namespace tsid
65
66#endif // ifndef __tsid_python_traj_se3_hpp__
Definition trajectory-base.hpp:33
Definition constraint-bound.hpp:26
Definition constraint-bound.hpp:25
Definition trajectory-se3.hpp:18
static void setReference(TrajSE3 &self, const pinocchio::SE3 &ref)
Definition trajectory-se3.hpp:40
static void getLastSample(const TrajSE3 &self, trajectories::TrajectorySample &sample)
Definition trajectory-se3.hpp:46
static void expose(const std::string &class_name)
Definition trajectory-se3.hpp:57
void visit(PyClass &cl) const
Definition trajectory-se3.hpp:21
static trajectories::TrajectorySample getSample(TrajSE3 &self, double time)
Definition trajectory-se3.hpp:53
static bool has_trajectory_ended(const TrajSE3 &self)
Definition trajectory-se3.hpp:50
static trajectories::TrajectorySample computeNext(TrajSE3 &self)
Definition trajectory-se3.hpp:43