From dc5f90283cd815113c3f0a1cd1de2204224c37d1 Mon Sep 17 00:00:00 2001 From: Megane Millan Date: Tue, 9 Jul 2024 14:57:28 +0200 Subject: [PATCH] [bindings] Add precisions to documentation --- .../python/multibody/joint/joints-models.hpp | 57 ++++++++++++++----- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/include/pinocchio/bindings/python/multibody/joint/joints-models.hpp b/include/pinocchio/bindings/python/multibody/joint/joints-models.hpp index 6285c0accf..c6253ade15 100644 --- a/include/pinocchio/bindings/python/multibody/joint/joints-models.hpp +++ b/include/pinocchio/bindings/python/multibody/joint/joints-models.hpp @@ -31,7 +31,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRX with x as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRX with the X axis ([1, 0, 0]) as rotation axis.")) .def( "getMotionAxis", &context::JointModelRX::getMotionAxis, "Rotation axis of the JointModelRX."); @@ -41,7 +43,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRY with y as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRY with the Y axis ([0, 1, 0]) as rotation axis.")) .def( "getMotionAxis", &context::JointModelRY::getMotionAxis, "Rotation axis of the JointModelRY."); @@ -51,7 +55,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRZ with z as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRZ with the Z axis ([0, 0, 1]) as rotation axis")) .def( "getMotionAxis", &context::JointModelRZ::getMotionAxis, "Rotation axis of the JointModelRZ."); @@ -80,7 +86,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRUBX with x as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRUBX with the X axis ([1, 0, 0]) as rotation axis")) .def( "getMotionAxis", &context::JointModelRUBX::getMotionAxis, "Rotation axis of the JointModelRUBX."); @@ -90,7 +98,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRUBY with y as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRUBY with the Y axis ([0, 1, 0]) as rotation axis")) .def( "getMotionAxis", &context::JointModelRUBY::getMotionAxis, "Rotation axis of the JointModelRUBY."); @@ -100,7 +110,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelRUBZ with z as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelRUBZ with the Z axis ([0, 0, 1]) as rotation axis")) .def( "getMotionAxis", &context::JointModelRUBZ::getMotionAxis, "Rotation axis of the JointModelRUBZ."); @@ -111,7 +123,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelPX with x as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelPX with the X axis ([1, 0, 0]) as rotation axis")) .def( "getMotionAxis", &context::JointModelPX::getMotionAxis, "Rotation axis of the JointModelPX."); @@ -121,7 +135,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelPY with y as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelPY with the Y axis ([0, 1, 0]) as rotation axis")) .def( "getMotionAxis", &context::JointModelPY::getMotionAxis, "Rotation axis of the JointModelPY."); @@ -131,7 +147,9 @@ namespace pinocchio bp::class_ & expose_joint_model(bp::class_ & cl) { - return cl.def(bp::init<>(bp::args("self"), "Init JointModelPZ with z as rotation axis")) + return cl + .def(bp::init<>( + bp::args("self"), "Init JointModelPZ with the Z axis ([0, 0, 1]) as rotation axis")) .def( "getMotionAxis", &context::JointModelPZ::getMotionAxis, "Rotation axis of the JointModelPZ."); @@ -183,8 +201,11 @@ namespace pinocchio { return cl .def(bp::init( - bp::args("self", "pitch"), "Init JointModelHX with pitch value")) - .def(bp::init<>(bp::args("self"), "Init JointModelHX with pitch 0.0")) + bp::args("self", "pitch"), + "Init JointModelHX with pitch value and the X axis ([1, 0, 0]) as a rotation axis.")) + .def(bp::init<>( + bp::args("self"), + "Init JointModelHX with pitch 0.0 and the X axis ([1, 0, 0]) as a rotation axis.")) .def( "getMotionAxis", &context::JointModelHX::getMotionAxis, "Rotation axis of the JointModelHX.") @@ -197,8 +218,11 @@ namespace pinocchio { return cl .def(bp::init( - bp::args("self", "pitch"), "Init JointModelHY with pitch value.")) - .def(bp::init<>(bp::args("self"), "Init JointModelHY with pitch 0.0")) + bp::args("self", "pitch"), + "Init JointModelHY with pitch value and the Y axis ([0, 1, 0]) as a rotation axis.")) + .def(bp::init<>( + bp::args("self"), + "Init JointModelHY with pitch 0.0 and the Y axis ([0, 1, 0]) as a rotation axis.")) .def( "getMotionAxis", &context::JointModelHY::getMotionAxis, "Rotation axis of the JointModelHY.") @@ -211,8 +235,11 @@ namespace pinocchio { return cl .def(bp::init( - bp::args("self", "pitch"), "Init JointModelHZ with pitch value")) - .def(bp::init<>(bp::args("self"), "Init JointModelHZ with pitch 0.0")) + bp::args("self", "pitch"), + "Init JointModelHZ with pitch value and the Z axis ([0, 0, 1]) as a rotation axis.")) + .def(bp::init<>( + bp::args("self"), + "Init JointModelHZ with pitch 0.0 and the Z axis ([0, 0, 1]) as a rotation axis.")) .def( "getMotionAxis", &context::JointModelHZ::getMotionAxis, "Rotation axis of the JointModelHZ.")