5 #ifndef __pinocchio_python_joints_models_hpp__
6 #define __pinocchio_python_joints_models_hpp__
8 #include <boost/python.hpp>
31 bp::class_<context::JointModelRX> &
32 expose_joint_model<context::JointModelRX>(bp::class_<context::JointModelRX> & cl)
36 bp::args(
"self"),
"Init JointModelRX with the X axis ([1, 0, 0]) as rotation axis."))
39 "Rotation axis of the JointModelRX.");
43 bp::class_<context::JointModelRY> &
44 expose_joint_model<context::JointModelRY>(bp::class_<context::JointModelRY> & cl)
48 bp::args(
"self"),
"Init JointModelRY with the Y axis ([0, 1, 0]) as rotation axis."))
51 "Rotation axis of the JointModelRY.");
55 bp::class_<context::JointModelRZ> &
56 expose_joint_model<context::JointModelRZ>(bp::class_<context::JointModelRZ> & cl)
60 bp::args(
"self"),
"Init JointModelRZ with the Z axis ([0, 0, 1]) as rotation axis"))
63 "Rotation axis of the JointModelRZ.");
68 bp::class_<context::JointModelRevoluteUnaligned> &
69 expose_joint_model<context::JointModelRevoluteUnaligned>(
70 bp::class_<context::JointModelRevoluteUnaligned> & cl)
73 .def(bp::init<context::Scalar, context::Scalar, context::Scalar>(
74 bp::args(
"self",
"x",
"y",
"z"),
75 "Init JointModelRevoluteUnaligned from the components x, y, z of the axis"))
76 .def(bp::init<const context::Vector3s &>(
77 bp::args(
"self",
"axis"),
78 "Init JointModelRevoluteUnaligned from an axis with x-y-z components"))
81 "Rotation axis of the JointModelRevoluteUnaligned.");
86 bp::class_<context::JointModelRUBX> &
87 expose_joint_model<context::JointModelRUBX>(bp::class_<context::JointModelRUBX> & cl)
91 bp::args(
"self"),
"Init JointModelRUBX with the X axis ([1, 0, 0]) as rotation axis"))
94 "Rotation axis of the JointModelRUBX.");
98 bp::class_<context::JointModelRUBY> &
99 expose_joint_model<context::JointModelRUBY>(bp::class_<context::JointModelRUBY> & cl)
103 bp::args(
"self"),
"Init JointModelRUBY with the Y axis ([0, 1, 0]) as rotation axis"))
106 "Rotation axis of the JointModelRUBY.");
110 bp::class_<context::JointModelRUBZ> &
111 expose_joint_model<context::JointModelRUBZ>(bp::class_<context::JointModelRUBZ> & cl)
115 bp::args(
"self"),
"Init JointModelRUBZ with the Z axis ([0, 0, 1]) as rotation axis"))
118 "Rotation axis of the JointModelRUBZ.");
123 bp::class_<context::JointModelPX> &
124 expose_joint_model<context::JointModelPX>(bp::class_<context::JointModelPX> & cl)
128 bp::args(
"self"),
"Init JointModelPX with the X axis ([1, 0, 0]) as rotation axis"))
131 "Rotation axis of the JointModelPX.");
135 bp::class_<context::JointModelPY> &
136 expose_joint_model<context::JointModelPY>(bp::class_<context::JointModelPY> & cl)
140 bp::args(
"self"),
"Init JointModelPY with the Y axis ([0, 1, 0]) as rotation axis"))
143 "Rotation axis of the JointModelPY.");
147 bp::class_<context::JointModelPZ> &
148 expose_joint_model<context::JointModelPZ>(bp::class_<context::JointModelPZ> & cl)
152 bp::args(
"self"),
"Init JointModelPZ with the Z axis ([0, 0, 1]) as rotation axis"))
155 "Rotation axis of the JointModelPZ.");
160 bp::class_<context::JointModelPrismaticUnaligned> &
161 expose_joint_model<context::JointModelPrismaticUnaligned>(
162 bp::class_<context::JointModelPrismaticUnaligned> & cl)
165 .def(bp::init<context::Scalar, context::Scalar, context::Scalar>(
166 bp::args(
"self",
"x",
"y",
"z"),
167 "Init JointModelPrismaticUnaligned from the components x, y, z of the axis"))
168 .def(bp::init<const context::Vector3s &>(
169 bp::args(
"self",
"axis"),
170 "Init JointModelPrismaticUnaligned from an axis with x-y-z components"))
173 "Translation axis of the JointModelPrismaticUnaligned.");
178 bp::class_<context::JointModelHelicalUnaligned> &
179 expose_joint_model<context::JointModelHelicalUnaligned>(
180 bp::class_<context::JointModelHelicalUnaligned> & cl)
183 .def(bp::init<context::Scalar, context::Scalar, context::Scalar, context::Scalar>(
184 bp::args(
"self",
"x",
"y",
"z",
"pitch"),
185 "Init JointModelHelicalUnaligned from the components x, y, z of the axis and the pitch"))
186 .def(bp::init<const context::Vector3s &, context::Scalar>(
187 bp::args(
"self",
"axis",
"pitch"),
188 "Init JointModelHelicalUnaligned from an axis with x-y-z components and the pitch"))
191 "Translation axis of the JointModelHelicalUnaligned.")
194 "Pitch h of the JointModelHelicalUnaligned.");
199 bp::class_<context::JointModelHX> &
200 expose_joint_model<context::JointModelHX>(bp::class_<context::JointModelHX> & cl)
203 .def(bp::init<context::Scalar>(
204 bp::args(
"self",
"pitch"),
205 "Init JointModelHX with pitch value and the X axis ([1, 0, 0]) as a rotation axis."))
208 "Init JointModelHX with pitch 0.0 and the X axis ([1, 0, 0]) as a rotation axis."))
211 "Rotation axis of the JointModelHX.")
216 bp::class_<context::JointModelHY> &
217 expose_joint_model<context::JointModelHY>(bp::class_<context::JointModelHY> & cl)
220 .def(bp::init<context::Scalar>(
221 bp::args(
"self",
"pitch"),
222 "Init JointModelHY with pitch value and the Y axis ([0, 1, 0]) as a rotation axis."))
225 "Init JointModelHY with pitch 0.0 and the Y axis ([0, 1, 0]) as a rotation axis."))
228 "Rotation axis of the JointModelHY.")
233 bp::class_<context::JointModelHZ> &
234 expose_joint_model<context::JointModelHZ>(bp::class_<context::JointModelHZ> & cl)
237 .def(bp::init<context::Scalar>(
238 bp::args(
"self",
"pitch"),
239 "Init JointModelHZ with pitch value and the Z axis ([0, 0, 1]) as a rotation axis."))
242 "Init JointModelHZ with pitch 0.0 and the Z axis ([0, 0, 1]) as a rotation axis."))
245 "Rotation axis of the JointModelHZ.")
251 bp::class_<context::JointModelUniversal> &
252 expose_joint_model<context::JointModelUniversal>(bp::class_<context::JointModelUniversal> & cl)
258 bp::args(
"self",
"x1",
"y1",
"z1",
"x2",
"y2",
"z2"),
259 "Init JointModelUniversal from the components x, y, z of the axes"))
260 .def(bp::init<const context::Vector3s &, const context::Vector3s &>(
261 bp::args(
"self",
"axis1",
"axis2"),
262 "Init JointModelUniversal from two axes with x-y-z components"))
265 "First rotation axis of the JointModelUniversal.")
268 "Second rotation axis of the JointModelUniversal.");
274 :
public boost::static_visitor<context::JointModelComposite &>
286 template<
typename Jo
intModelDerived>
298 return boost::apply_visitor(
303 :
public boost::static_visitor<context::JointModelComposite *>
312 template<
typename Jo
intModelDerived>
321 return boost::apply_visitor(
332 bp::class_<context::JointModelComposite> &
333 expose_joint_model<context::JointModelComposite>(bp::class_<context::JointModelComposite> & cl)
336 .def(bp::init<const size_t>(
337 bp::args(
"self",
"size"),
"Init JointModelComposite with a defined size"))
340 bp::make_constructor(
init_proxy1, bp::default_call_policies(), bp::args(
"joint_model")),
341 "Init JointModelComposite from a joint")
344 bp::make_constructor(
345 init_proxy2, bp::default_call_policies(), bp::args(
"joint_model",
"joint_placement")),
346 "Init JointModelComposite from a joint and a placement")
348 .add_property(
"jointPlacements", &context::JointModelComposite::jointPlacements)
352 (bp::arg(
"self"), bp::arg(
"joint_model"),
354 "Add a joint to the vector of joints.", bp::return_internal_reference<>())
356 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
357 .def(bp::self == bp::self)
358 .def(bp::self != bp::self)
366 #endif // ifndef __pinocchio_python_joint_models_hpp__