tsid 1.9.0
Efficient Task Space Inverse Dynamics for Multi-body Systems based on Pinocchio
Loading...
Searching...
No Matches
HQPData.hpp
Go to the documentation of this file.
1//
2// Copyright (c) 2018 CNRS, NYU, MPI Tübingen
3//
4// This file is part of tsid
5// tsid is free software: you can redistribute it
6// and/or modify it under the terms of the GNU Lesser General Public
7// License as published by the Free Software Foundation, either version
8// 3 of the License, or (at your option) any later version.
9// tsid is distributed in the hope that it will be
10// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
11// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// General Lesser Public License for more details. You should have
13// received a copy of the GNU Lesser General Public License along with
14// tsid If not, see
15// <http://www.gnu.org/licenses/>.
16//
17
18#ifndef __tsid_python_test_hpp__
19#define __tsid_python_test_hpp__
20
22
24
25namespace tsid {
26namespace python {
27namespace bp = boost::python;
28
29template <typename T>
31 : public boost::python::def_visitor<ConstPythonVisitor<T> > {
32 template <class PyClass>
33
34 void visit(PyClass& cl) const {
35 cl.def(bp::init<>("Default Constructor"))
36 .def("print_all", &T::print)
37 .def("append", &T::append_eq, bp::arg("data"))
38 .def("append", &T::append_ineq, bp::arg("data"))
39 .def("append", &T::append_bound, bp::arg("data"));
40 }
41
42 static void expose(const std::string& class_name) {
43 std::string doc = "ConstraintLevel info.";
44 bp::class_<T>(class_name.c_str(), doc.c_str(), bp::no_init)
46 }
47};
48
49template <typename T>
51 : public boost::python::def_visitor<HQPPythonVisitor<T> > {
52 template <class PyClass>
53
54 void visit(PyClass& cl) const {
55 cl.def(bp::init<>("Default Constructor"))
56 .def("print_all", &T::print)
57 .def("resize", &T::resize, bp::arg("i"))
58 .def("append", &T::append_helper, bp::arg("constraintLevel"));
59 }
60
61 static void expose(const std::string& class_name) {
62 std::string doc = "HQPdata info.";
63 bp::class_<T>(class_name.c_str(), doc.c_str(), bp::no_init)
65 }
66};
67
68} // namespace python
69} // namespace tsid
70
71#endif // ifndef __tsid_python_test_hpp__
Definition constraint-bound.hpp:26
Definition constraint-bound.hpp:25
Definition HQPData.hpp:31
void visit(PyClass &cl) const
Definition HQPData.hpp:34
static void expose(const std::string &class_name)
Definition HQPData.hpp:42
Definition HQPData.hpp:51
void visit(PyClass &cl) const
Definition HQPData.hpp:54
static void expose(const std::string &class_name)
Definition HQPData.hpp:61