Skip to content

Commit 8b4c065

Browse files
committed
python: build contactCholeskyDecomposition for casadi binding
1 parent 5dd3235 commit 8b4c065

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ namespace pinocchio
7373

7474
StdVectorPythonVisitor<RigidConstraintDataVector>::expose("StdVec_RigidConstraintData");
7575

76-
#ifndef PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
7776
ContactCholeskyDecompositionPythonVisitor<context::ContactCholeskyDecomposition>::expose();
78-
#endif // PINOCCHIO_PYTHON_SKIP_ALGORITHM_CONSTRAINED_DYNAMICS
7977

8078
bp::def(
8179
"initConstraintDynamics",

include/pinocchio/bindings/python/algorithm/contact-cholesky.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ namespace pinocchio
188188
"Returns the Constraint Cholesky decomposition associated to this "
189189
"DelassusCholeskyExpression.",
190190
bp::return_internal_reference<>())
191-
192191
.def(DelassusOperatorBasePythonVisitor<DelassusCholeskyExpression>());
193192
}
194193

195194
{
195+
#ifndef PINOCCHIO_PYTHON_SKIP_CASADI_UNSUPPORTED
196196
typedef DelassusOperatorDenseTpl<context::Scalar, context::Options> DelassusOperatorDense;
197197
bp::class_<DelassusOperatorDense>(
198198
"DelassusOperatorDense", "Delassus Cholesky dense operator from a dense matrix.",
@@ -201,9 +201,11 @@ namespace pinocchio
201201
bp::args("self", "matrix"), "Build from a given dense matrix"))
202202

203203
.def(DelassusOperatorBasePythonVisitor<DelassusOperatorDense>());
204+
#endif // PINOCCHIO_PYTHON_SKIP_CASADI_UNSUPPORTED
204205
}
205206

206207
{
208+
#ifndef PINOCCHIO_PYTHON_SKIP_CASADI_UNSUPPORTED
207209
typedef DelassusOperatorSparseTpl<context::Scalar, context::Options>
208210
DelassusOperatorSparse;
209211
bp::class_<DelassusOperatorSparse, boost::noncopyable>(
@@ -213,6 +215,7 @@ namespace pinocchio
213215
bp::args("self", "matrix"), "Build from a given sparse matrix"))
214216

215217
.def(DelassusOperatorBasePythonVisitor<DelassusOperatorSparse>());
218+
#endif // PINOCCHIO_PYTHON_SKIP_CASADI_UNSUPPORTED
216219
}
217220
#ifdef PINOCCHIO_WITH_ACCELERATE_SUPPORT
218221
{

0 commit comments

Comments
 (0)