5 #ifndef __pinocchio_python_joint_variants_hpp__ 6 #define __pinocchio_python_joint_variants_hpp__ 8 #include <boost/python.hpp> 11 #include "pinocchio/multibody/joint/joint-collection.hpp" 19 template<
class Jo
intModelDerived>
21 :
public boost::python::def_visitor< JointModelDerivedPythonVisitor<JointModelDerived> >
25 template<
class PyClass>
29 .def(bp::init<>(bp::arg(
"self")))
31 .add_property(
"id",&
get_id)
34 .add_property(
"nq",&
get_nq)
35 .add_property(
"nv",&
get_nv)
38 bp::args(
"self",
"id",
"idx_q",
"idx_v"))
39 .def(
"hasSameIndexes",
40 &JointModelDerived::template hasSameIndexes<JointModelDerived>,
42 "Check if this has same indexes than other.")
45 .def(bp::self == bp::self)
46 .def(bp::self != bp::self)
52 static int get_idx_q(
const JointModelDerived &
self)
53 {
return self.idx_q(); }
54 static int get_idx_v(
const JointModelDerived &
self)
55 {
return self.idx_v(); }
56 static int get_nq(
const JointModelDerived &
self)
58 static int get_nv(
const JointModelDerived &
self)
63 template<
class Jo
intDataDerived>
65 :
public boost::python::def_visitor< JointDataDerivedPythonVisitor<JointDataDerived> >
69 template<
class PyClass>
74 .add_property(
"S",&get_S)
75 .add_property(
"M",&get_M)
76 .add_property(
"v",&get_v)
77 .add_property(
"c",&get_c)
78 .add_property(
"U",&get_U)
79 .add_property(
"Dinv",&get_Dinv)
80 .add_property(
"UDinv",&get_UDinv)
83 .def(bp::self == bp::self)
84 .def(bp::self != bp::self)
88 static typename JointDataDerived::Constraint_t
get_S(
const JointDataDerived &
self)
89 {
return self.S_accessor(); }
90 static typename JointDataDerived::Transformation_t
get_M(
const JointDataDerived &
self)
91 {
return self.M_accessor(); }
92 static typename JointDataDerived::Motion_t
get_v(
const JointDataDerived &
self)
93 {
return self.v_accessor(); }
94 static typename JointDataDerived::Bias_t
get_c(
const JointDataDerived &
self)
95 {
return self.c_accessor(); }
96 static typename JointDataDerived::U_t
get_U(
const JointDataDerived &
self)
97 {
return self.U_accessor(); }
98 static typename JointDataDerived::D_t
get_Dinv(
const JointDataDerived &
self)
99 {
return self.Dinv_accessor(); }
100 static typename JointDataDerived::UD_t
get_UDinv(
const JointDataDerived &
self)
101 {
return self.UDinv_accessor(); }
110 #endif // ifndef __pinocchio_python_joint_variants_hpp__ void visit(PyClass &cl) const
static JointDataDerived::D_t get_Dinv(const JointDataDerived &self)
static JointDataDerived::Transformation_t get_M(const JointDataDerived &self)
static JointDataDerived::Motion_t get_v(const JointDataDerived &self)
void visit(PyClass &cl) const
static JointDataDerived::Constraint_t get_S(const JointDataDerived &self)
static int get_idx_v(const JointModelDerived &self)
static JointDataDerived::U_t get_U(const JointDataDerived &self)
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model...
static JointDataDerived::UD_t get_UDinv(const JointDataDerived &self)
static int get_nq(const JointModelDerived &self)
Main pinocchio namespace.
static JointIndex get_id(const JointModelDerived &self)
void setIndexes(JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointIndex id, int q, int v)
Visit a JointModelTpl through JointSetIndexesVisitor to set the indexes of the joint in the kinematic...
static int get_idx_q(const JointModelDerived &self)
static JointDataDerived::Bias_t get_c(const JointDataDerived &self)
static int get_nv(const JointModelDerived &self)