5 #ifndef __pinocchio_python_algorithm_constraints_coulomb_friction_cone_hpp__
6 #define __pinocchio_python_algorithm_constraints_coulomb_friction_cone_hpp__
19 template<
typename CoulombFrictionCone>
21 :
public boost::python::def_visitor<CoulombFrictionConePythonVisitor<CoulombFrictionCone>>
26 template<
class PyClass>
29 cl.def(bp::init<const Scalar &>(bp::args(
"self",
"mu"),
"Default constructor"))
30 .def(bp::init<const Self &>(bp::args(
"self",
"other"),
"Copy constructor"))
32 .def_readwrite(
"mu", &
Self::mu,
"Friction coefficient.")
35 "isInside", &Self::template isInside<context::Vector3s>, bp::args(
"self",
"f"),
36 "Check whether a vector x lies within the cone.")
39 "project", &Self::template project<context::Vector3s>, bp::args(
"self",
"f"),
40 "Normal projection of a vector f onto the cone.")
42 "weightedProject", &Self::template weightedProject<context::Vector3s>,
43 bp::args(
"self",
"f",
"R"),
"Weighted projection of a vector f onto the cone.")
45 "computeNormalCorrection", &Self::template computeNormalCorrection<context::Vector3s>,
46 bp::args(
"self",
"v"),
47 "Compute the complementary shift associted to the Coulomb friction cone for "
48 "complementarity satisfaction in complementary problems.")
50 "computeRadialProjection", &Self::template computeRadialProjection<context::Vector3s>,
51 bp::args(
"self",
"f"),
52 "Compute the radial projection associted to the Coulomb friction cone.")
54 .def(
"dual", &Self::dual, bp::arg(
"self"),
"Returns the dual cone associated to this")
56 .def(
"dim", Self::dim,
"Returns the dimension of the cone.")
59 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
60 .def(bp::self == bp::self)
61 .def(bp::self != bp::self)
68 bp::class_<CoulombFrictionCone>(
69 "CoulombFrictionCone",
"3d Coulomb friction cone.\n", bp::no_init)
77 template<
typename DualCoulombFrictionCone>
79 :
public boost::python::def_visitor<
80 DualCoulombFrictionConePythonVisitor<DualCoulombFrictionCone>>
85 template<
class PyClass>
88 cl.def(bp::init<const Scalar &>(bp::args(
"self",
"mu"),
"Default constructor"))
89 .def(bp::init<const Self &>(bp::args(
"self",
"other"),
"Copy constructor"))
91 .def_readwrite(
"mu", &
Self::mu,
"Friction coefficient.")
94 "isInside", &Self::template isInside<context::Vector3s>, bp::args(
"self",
"v"),
95 "Check whether a vector x lies within the cone.")
98 "project", &Self::template project<context::Vector3s>, bp::args(
"self",
"v"),
99 "Project a vector v onto the cone.")
101 .def(
"dual", &
Self::dual, bp::arg(
"self"),
"Returns the dual cone associated to this.")
103 .def(
"dim", Self::dim,
"Returns the dimension of the cone.")
106 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
107 .def(bp::self == bp::self)
108 .def(bp::self != bp::self)
115 bp::class_<DualCoulombFrictionCone>(
116 "DualCoulombFrictionCone",
"Dual cone of the 3d Coulomb friction cone.\n", bp::no_init)
127 #endif // ifndef __pinocchio_python_algorithm_constraints_coulomb_friction_cone_hpp__