joint-model.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2022 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_python_multibody_joint_joint_model_hpp__
6 #define __pinocchio_python_multibody_joint_joint_model_hpp__
7 
11 
12 namespace pinocchio
13 {
14  namespace python
15  {
16  namespace bp = boost::python;
17 
18  template<typename JointModel>
20  {
22  typedef bp::object result_type;
23 
24  template<typename JointModelDerived>
26  {
27  bp::object obj(boost::ref(jmodel.derived()));
28  return obj;
29  }
30 
31  static result_type extract(const JointModel & jmodel)
32  {
33  return boost::apply_visitor(ExtractJointModelVariantTypeVisitor(), jmodel);
34  }
35  };
36 
37  template<typename JointModel>
39  {
40 
41  static void expose()
42  {
43  bp::class_<JointModel>("JointModel", "Generic Joint Model", bp::no_init)
44  .def(bp::init<>(bp::arg("self"), "Default constructor"))
45  .def(bp::init<const JointModel &>(bp::args("self", "other"), "Copy constructor"))
48  .def(
50  "Returns a reference of the internal joint managed by the JointModel",
51  bp::with_custodian_and_ward_postcall<0, 1>());
52  }
53  };
54 
55  } // namespace python
56 } // namespace pinocchio
57 
58 #endif // ifndef __pinocchio_python_multibody_joint_joint_model_hpp__
boost::python
pinocchio::python::ExtractJointModelVariantTypeVisitor::operator()
result_type operator()(const JointModelBase< JointModelDerived > &jmodel) const
Definition: joint-model.hpp:25
pinocchio::JointModelBase
Definition: joint-model-base.hpp:75
pinocchio::python::JointModelBasePythonVisitor
Definition: joint-derived.hpp:21
pinocchio::python::ExtractJointModelVariantTypeVisitor::result_type
bp::object result_type
Definition: joint-model.hpp:22
pinocchio::python::PrintableVisitor
Set the Python method str and repr to use the overloading operator<<.
Definition: printable.hpp:21
joint-generic.hpp
python
pinocchio::JointModelTpl< context::Scalar >
pinocchio::python::JointModelPythonVisitor
Definition: joint-model.hpp:38
pinocchio::python::ExtractJointModelVariantTypeVisitor
Definition: joint-model.hpp:19
pinocchio::python::ExtractJointModelVariantTypeVisitor::JointCollection
JointModel::JointCollection JointCollection
Definition: joint-model.hpp:21
joint-derived.hpp
printable.hpp
pinocchio::python::ExtractJointModelVariantTypeVisitor::extract
static result_type extract(const JointModel &jmodel)
Definition: joint-model.hpp:31
pinocchio::python::JointModelPythonVisitor::expose
static void expose()
Definition: joint-model.hpp:41
pinocchio::JointModelTpl< context::Scalar >::JointCollection
JointCollectionTpl< Scalar, Options > JointCollection
Definition: joint-generic.hpp:271
pinocchio::JointModelBase::derived
JointModelDerived & derived()
Definition: joint-model-base.hpp:82
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Wed Jun 19 2024 02:41:14