pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
baumgarte-corrector-parameters.hpp
1//
2// Copyright (c) 2025 INRIA
3//
4
5#pragma once
6
7#include <eigenpy/copyable.hpp>
8
9#include "pinocchio/constraints.hpp"
10
11#include "pinocchio/bindings/python/utils/cast.hpp"
12#include "pinocchio/bindings/python/utils/comparable.hpp"
13
14namespace pinocchio
15{
16 namespace python
17 {
18 namespace bp = boost::python;
19
20 template<typename BaumgarteCorrectorParameters>
22 : public boost::python::def_visitor<
23 BaumgarteCorrectorParametersPythonVisitor<BaumgarteCorrectorParameters>>
24 {
25 typedef typename BaumgarteCorrectorParameters::Scalar Scalar;
26 typedef BaumgarteCorrectorParameters Self;
27
28 public:
29 template<class PyClass>
30 void visit(PyClass & cl) const
31 {
32 cl.def(bp::init<Scalar, Scalar>(bp::args("self", "Kp", "Kd"), "Default constructor."))
33 .def_readwrite("Kp", &Self::Kp, "Proportional corrector value.")
34 .def_readwrite("Kd", &Self::Kd, "Damping corrector value.")
35 .def(ComparableVisitor<Self, pinocchio::is_floating_point<Scalar>::value>());
36 }
37
38 static void expose()
39 {
40 if (eigenpy::check_registration<BaumgarteCorrectorParameters>())
41 return;
42 bp::class_<BaumgarteCorrectorParameters>(
43 "BaumgarteCorrectorParameters", "Parameters of the Baumgarte Corrector.", bp::no_init)
45 }
46 };
47
48 } // namespace python
49} // namespace pinocchio
Main pinocchio namespace.
Definition treeview.dox:11
Add the Python method == and != to allow a comparison of this.