-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
This is meant to spike test the extent to which Python can use the existing Systems framework.
From Robin's initial prototype with pybind11
and the follow-up implementations Drake now has, it seems like pybind11
should be able to handle most of the basic API.
I've only hit two main sticking points thus far:
- Taking ownership of Python-created objects in C++ - the use of
std::unique_ptr<>
may provide some barriers to easily taking ownership of Python-created objects. Discussion frompybind11
here, an example repro here (comparingunique_ptr
andshared_ptr
destruction). - Templates (scalar type conversion) - a messy prototype is available here. This seems rough, but achievable, but runs into issues with the above issue on
std::unique_ptr<>
(specifically, when trying to have Python-definedConverter<>
functions passed back toBaseConverter
- for testing Python-defined classes).
Motivation for both of these:
- Templates / scalar type conversion - also for handling
Value<T>
instances forAbstractValue
s std::unique_ptr
- Ensure that we can properly construct diagrams, create model values, do cloning, etc.
@RussTedrake - can I ask if you had run into any of these issues when you were prototyping these things?
Metadata
Metadata
Assignees
Labels
No labels