Skip to content

Commit bd73498

Browse files
committed
python: Generate constraintDynamics bindings for casadi
1 parent 94072c2 commit bd73498

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

bindings/python/algorithm/expose-constrained-dynamics.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ namespace pinocchio
2525
typedef PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(context::RigidConstraintData)
2626
RigidConstraintDataVector;
2727

28-
#ifndef PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
29-
3028
static const context::VectorXs constraintDynamics_proxy(
3129
const context::Model & model,
3230
context::Data & data,
@@ -53,8 +51,6 @@ namespace pinocchio
5351
return constraintDynamics(model, data, q, v, tau, contact_models, contact_datas);
5452
}
5553

56-
#endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
57-
5854
void exposeConstraintDynamics()
5955
{
6056
using namespace Eigen;
@@ -79,6 +75,7 @@ namespace pinocchio
7975

8076
#ifndef PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
8177
ContactCholeskyDecompositionPythonVisitor<context::ContactCholeskyDecomposition>::expose();
78+
#endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
8279

8380
bp::def(
8481
"initConstraintDynamics",
@@ -112,8 +109,6 @@ namespace pinocchio
112109
"This function returns joint acceleration of the system. The contact forces are "
113110
"stored in the list data.contact_forces.",
114111
mimic_not_supported_function<>(0));
115-
116-
#endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
117112
}
118113
} // namespace python
119114
} // namespace pinocchio

include/pinocchio/math/eigenvalues.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace pinocchio
3535
void run(const MatrixLike & mat)
3636
{
3737
PINOCCHIO_CHECK_INPUT_ARGUMENT(max_it >= 1);
38-
PINOCCHIO_CHECK_INPUT_ARGUMENT(rel_tol > Scalar(0));
38+
PINOCCHIO_CHECK_INPUT_ARGUMENT((check_expression_if_real<Scalar, true>(rel_tol > 0)));
3939
Scalar eigenvalue_est = principal_eigen_vector.norm();
4040

4141
for (it = 0; it < max_it; ++it)
@@ -68,7 +68,7 @@ namespace pinocchio
6868
void lowest(const MatrixLike & mat, const bool compute_largest = true)
6969
{
7070
PINOCCHIO_CHECK_INPUT_ARGUMENT(max_it >= 1);
71-
PINOCCHIO_CHECK_INPUT_ARGUMENT(rel_tol > Scalar(0));
71+
PINOCCHIO_CHECK_INPUT_ARGUMENT((check_expression_if_real<Scalar, true>(rel_tol > 0)));
7272

7373
if (compute_largest)
7474
run(mat);

0 commit comments

Comments
 (0)