Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit d5a2c4f

Browse files
committed
Add pickling to manifolds which missed it
1 parent 8470bbd commit d5a2c4f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.gersemirc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
line_length: 80
22
cache: true
33
indent: 2
4-
quiet: true
54
warn_about_unknown_commands: false
6-
workers: 8

bindings/python/expose-manifold.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ void exposePinocchioSpaces() {
207207
bp::make_function(&Multibody::getModel,
208208
bp::return_internal_reference<>()),
209209
"Return the Pinocchio model instance.")
210-
.def(PolymorphicVisitor<PolyManifold>());
210+
.def(PolymorphicVisitor<PolyManifold>())
211+
.enable_pickling_(true);
211212

212213
using MultiPhase = MultibodyPhaseSpace<Scalar>;
213214
bp::class_<MultiPhase, bp::bases<Manifold>>(
@@ -223,7 +224,8 @@ void exposePinocchioSpaces() {
223224
return m.getBaseSpace();
224225
},
225226
bp::return_internal_reference<>()))
226-
.def(PolymorphicVisitor<PolyManifold>());
227+
.def(PolymorphicVisitor<PolyManifold>())
228+
.enable_pickling_(true);
227229
}
228230
#endif
229231

@@ -235,7 +237,8 @@ void exposeManifolds() {
235237
bp::class_<VectorSpaceTpl<Scalar>, bp::bases<Manifold>>(
236238
"VectorSpace", "Basic Euclidean vector space.", bp::no_init)
237239
.def(bp::init<const int>(("self"_a, "dim")))
238-
.def(PolymorphicVisitor<PolyManifold>());
240+
.def(PolymorphicVisitor<PolyManifold>())
241+
.enable_pickling_(true);
239242

240243
exposeCartesianProduct();
241244
#ifdef PROXSUITE_NLP_WITH_PINOCCHIO

0 commit comments

Comments
 (0)