5 #ifndef __pinocchio_python_multibody_joint_joint_hpp__ 6 #define __pinocchio_python_multibody_joint_joint_hpp__ 8 #include <boost/python.hpp> 10 #include "pinocchio/multibody/joint/joint-generic.hpp" 20 :
public boost::python::def_visitor< JointModelPythonVisitor >
23 template<
class PyClass>
27 .def(bp::init<>(bp::arg(
"self")))
29 .add_property(
"id",&
getId)
32 .add_property(
"nq",&
getNq)
33 .add_property(
"nv",&
getNv)
35 "Return vector of boolean if joint has configuration limits.")
37 "Return vector of boolean if joint has configuration limits in tangent space.")
40 bp::args(
"self",
"id",
"idx_q",
"idx_v"))
41 .def(
"hasSameIndexes",
42 &JointModel::hasSameIndexes<JointModel>,
43 bp::args(
"self",
"other"),
44 "Check if this has same indexes than other.")
48 "Returns string indicating the joint type (class name):" 49 "\n\t- JointModelR[*]: Revolute Joint, with rotation axis [*] ∈ [X,Y,Z]" 50 "\n\t- JointModelRevoluteUnaligned: Revolute Joint, with rotation axis not aligned with X, Y, nor Z" 51 "\n\t- JointModelRUB[*]: Unbounded revolute Joint (without position limits), with rotation axis [*] ∈ [X,Y,Z]" 52 "\n\t- JointModelRevoluteUnboundedUnaligned: Unbounded revolute Joint, with rotation axis not aligned with X, Y, nor Z" 53 "\n\t- JointModelP[*]: Prismatic Joint, with rotation axis [*] ∈ [X,Y,Z]" 54 "\n\t- JointModelPlanar: Planar joint" 55 "\n\t- JointModelPrismaticUnaligned: Prismatic joint, with translation axis not aligned with X, Y, nor Z" 56 "\n\t- JointModelSphericalZYX: Spherical joint (3D rotation)" 57 "\n\t- JointModelTranslation: Translation joint (3D translation)" 58 "\n\t- JointModelFreeFlyer: Joint enabling 3D rotation and translations." 61 .def(bp::self == bp::self)
62 .def(bp::self != bp::self)
74 bp::class_<JointModel>(
"JointModel",
75 "Generic Joint Model",
77 .
def(bp::init<JointModel>(bp::args(
"self",
"other")))
87 #endif // ifndef __pinocchio_python_multibody_joint_joint_hpp__ static int getIdx_q(const JointModel &self)
Set the Python method str and repr to use the overloading operator<<.
void def(const char *name, Func func)
static int getNv(const JointModel &self)
static int getNq(const JointModel &self)
static int getIdx_v(const JointModel &self)
std::string shortname() const
void setIndexes(JointIndex id, int nq, int nv)
const std::vector< bool > hasConfigurationLimit() const
Main pinocchio namespace.
const std::vector< bool > hasConfigurationLimitInTangent() const
void visit(PyClass &cl) const
static JointIndex getId(const JointModel &self)