-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
py systems: Enable / show example of doing convertible VectorSystem #10745
Comments
Thanks! My "pain point" request has two parts. (1) just being able to convert subclasses of VectorSystem... which I think is just a matter of declaring the ScalarConverter versions of the constructor, etc(?), and (2) getting rid of the boilerplate around the python system conversion. EDIT(eric): Moved pain point (2) to #10755. |
I would like this issue to focus on the first pain point, will create a separate one for the second. Thanks! |
User ran into this pain point again on StackOverflow: https://stackoverflow.com/questions/57512465/class-implementation-in-python Upon revisiting this, though, it seems like it may be more complicated: That issue is a still be nebulous due to the NumPy version requirements + potential for segfaults. Proposed solutions:
|
TTBOMK nothing uses the type of a VectorSystem to infer facts. It should always just be asking quacks-like questions as in "Is this System SISO", etc. Or in other words, I would be happy to break any code that uses the runtime type of a VectorSystem to infer facts. |
Per #20989 (comment), we should disprefer VectorSystem in the first place, so there's no point in gold-plating its Python bindings. |
From @RussTedrake's pain points:
There are examples of doing scalar convertible types here:
https://github.com/RobotLocomotion/drake/tree/ffaa013/bindings/pydrake/systems/test/scalar_conversion_test.py#L12
However, I should inspect how hard it is to allow intermediate C++ base classes (e.g.
VectorSystem
) to do scalar conversion through this shindig. If it's messy / boilerplatey, will consider just reimplementing the intermediate in Python or what not.Either one shouldn't be that hard.
The text was updated successfully, but these errors were encountered: