[1] Flow-based robotics software
What is a robust, reasonable, and performant pattern for robotics software? I have become fixated with the idea of "motor schemas" as outlined in Behavior Based Robotics.
To put it in my own words: For every data input (i.e. sensor reading) there should be a unidirectional computational flow transforming the input into a motor command. The system as a whole is comprised of parallel flows which are not aware of one another, and whose constituent motor commands are vector summed to yield overall motor behavior.
This feels clean and data-driven to me. A natural fit for this approach is flow-based programming which seems like a healthy balance between the composability of functional programming and some light statefulness (state may exist on a component level though there is no global state).
A great library for embedded flow-based programming is RAMEN from Zubax Robotics. I've played with it on my laptop and now I'm trying to settle on an MCU with a decent C++20-compatible toolchain with the goal of making a little PoC robot.
Now, if we design our system such that the Modules Serve the Network (after all, what is a system if not a network?), and let our robot accept network definitions as input, then things start to get interesting.