With the performance issue of Systems largely resolved (#29), the remaining question asked by @RussTedrake is whether the StateMachine can be converted to a Diagram where state-dependent behavior is controlled by a PortSwitch. It certainly seems doable, but a more insightful answer can only be obtained by digging into the details. For example, the request-reply behavior used in aborting the current plan, supported by ZMQ, is not supported by LCM, but can certainly be emulated by having multiple LCM channels, but this will lead to more cumbersome Diagrams or event handling/input port updating in LCM-driven loop.
I think a good first step is to identify an essential subset of the features supported by StateMachine and implement those features as a Diagram.
With the performance issue of
Systems
largely resolved (#29), the remaining question asked by @RussTedrake is whether theStateMachine
can be converted to aDiagram
where state-dependent behavior is controlled by aPortSwitch
. It certainly seems doable, but a more insightful answer can only be obtained by digging into the details. For example, the request-reply behavior used in aborting the current plan, supported by ZMQ, is not supported by LCM, but can certainly be emulated by having multiple LCM channels, but this will lead to more cumbersome Diagrams or event handling/input port updating in LCM-driven loop.I think a good first step is to identify an essential subset of the features supported by
StateMachine
and implement those features as aDiagram
.