5 #ifndef __pinocchio_python_joints_models_hpp__
6 #define __pinocchio_python_joints_models_hpp__
8 #include <boost/python.hpp>
31 bp::class_<context::JointModelRevoluteUnaligned> &
32 expose_joint_model<context::JointModelRevoluteUnaligned>(
33 bp::class_<context::JointModelRevoluteUnaligned> & cl)
36 .def(bp::init<context::Scalar, context::Scalar, context::Scalar>(
37 bp::args(
"self",
"x",
"y",
"z"),
38 "Init JointModelRevoluteUnaligned from the components x, y, z of the axis"))
39 .def(bp::init<const context::Vector3s &>(
40 bp::args(
"self",
"axis"),
41 "Init JointModelRevoluteUnaligned from an axis with x-y-z components"))
44 "Rotation axis of the JointModelRevoluteUnaligned.");
49 bp::class_<context::JointModelPrismaticUnaligned> &
50 expose_joint_model<context::JointModelPrismaticUnaligned>(
51 bp::class_<context::JointModelPrismaticUnaligned> & cl)
54 .def(bp::init<context::Scalar, context::Scalar, context::Scalar>(
55 bp::args(
"self",
"x",
"y",
"z"),
56 "Init JointModelPrismaticUnaligned from the components x, y, z of the axis"))
57 .def(bp::init<const context::Vector3s &>(
58 bp::args(
"self",
"axis"),
59 "Init JointModelPrismaticUnaligned from an axis with x-y-z components"))
62 "Translation axis of the JointModelPrismaticUnaligned.");
67 bp::class_<context::JointModelHelicalUnaligned> &
68 expose_joint_model<context::JointModelHelicalUnaligned>(
69 bp::class_<context::JointModelHelicalUnaligned> & cl)
72 .def(bp::init<context::Scalar, context::Scalar, context::Scalar, context::Scalar>(
73 bp::args(
"self",
"x",
"y",
"z",
"pitch"),
74 "Init JointModelHelicalUnaligned from the components x, y, z of the axis and the pitch"))
75 .def(bp::init<const context::Vector3s &, context::Scalar>(
76 bp::args(
"self",
"axis",
"pitch"),
77 "Init JointModelHelicalUnaligned from an axis with x-y-z components and the pitch"))
80 "Translation axis of the JointModelHelicalUnaligned.")
83 "Pitch h of the JointModelHelicalUnaligned.");
88 bp::class_<context::JointModelHX> &
89 expose_joint_model<context::JointModelHX>(bp::class_<context::JointModelHX> & cl)
92 .def(bp::init<context::Scalar>(
93 bp::args(
"self",
"pitch"),
"Init JointModelHX with pitch value"))
94 .def(bp::init<>(bp::args(
"self"),
"Init JointModelHX with pitch 0.0"))
99 bp::class_<context::JointModelHY> &
100 expose_joint_model<context::JointModelHY>(bp::class_<context::JointModelHY> & cl)
103 .def(bp::init<context::Scalar>(
104 bp::args(
"self",
"pitch"),
"Init JointModelHY with pitch value."))
105 .def(bp::init<>(bp::args(
"self"),
"Init JointModelHY with pitch 0.0"))
110 bp::class_<context::JointModelHZ> &
111 expose_joint_model<context::JointModelHZ>(bp::class_<context::JointModelHZ> & cl)
114 .def(bp::init<context::Scalar>(
115 bp::args(
"self",
"pitch"),
"Init JointModelHZ with pitch value"))
116 .def(bp::init<>(bp::args(
"self"),
"Init JointModelHZ with pitch 0.0"))
122 bp::class_<context::JointModelUniversal> &
123 expose_joint_model<context::JointModelUniversal>(bp::class_<context::JointModelUniversal> & cl)
129 bp::args(
"self",
"x1",
"y1",
"z1",
"x2",
"y2",
"z2"),
130 "Init JointModelUniversal from the components x, y, z of the axes"))
131 .def(bp::init<const context::Vector3s &, const context::Vector3s &>(
132 bp::args(
"self",
"axis1",
"axis2"),
133 "Init JointModelUniversal from two axes with x-y-z components"))
136 "First rotation axis of the JointModelUniversal.")
139 "Second rotation axis of the JointModelUniversal.");
145 :
public boost::static_visitor<context::JointModelComposite &>
157 template<
typename Jo
intModelDerived>
169 return boost::apply_visitor(
174 :
public boost::static_visitor<context::JointModelComposite *>
183 template<
typename Jo
intModelDerived>
192 return boost::apply_visitor(
203 bp::class_<context::JointModelComposite> &
204 expose_joint_model<context::JointModelComposite>(bp::class_<context::JointModelComposite> & cl)
207 .def(bp::init<const size_t>(
208 bp::args(
"self",
"size"),
"Init JointModelComposite with a defined size"))
211 bp::make_constructor(
init_proxy1, bp::default_call_policies(), bp::args(
"joint_model")),
212 "Init JointModelComposite from a joint")
215 bp::make_constructor(
216 init_proxy2, bp::default_call_policies(), bp::args(
"joint_model",
"joint_placement")),
217 "Init JointModelComposite from a joint and a placement")
219 .add_property(
"jointPlacements", &context::JointModelComposite::jointPlacements)
223 (bp::arg(
"self"), bp::arg(
"joint_model"),
225 "Add a joint to the vector of joints.", bp::return_internal_reference<>())
227 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
228 .def(bp::self == bp::self)
229 .def(bp::self != bp::self)
237 #endif // ifndef __pinocchio_python_joint_models_hpp__