So, I was thinking about the current design of the ExampleBots where there is a microcomputer running ROS2 (assumed to be a Pi 4 at this point) and a microcontroller handling all of the low level sensors, motor driver, power management, etc (assumed to be a Teensy 4.1 at this point). And I was thinking about micro-ROS or not micro-ROS...and all this led me to rethink the microcontroller and the lower level systems. I wanted to pass it by the group.
What if each subsystem (ie distance sensors, surface sensors, motor driver, power info) is it's own self sufficient component? Each with its own microcontroller written to manage it's low level components. There would be no single microcontroller to be a bottleneck, just like in other discussions Camp has multiple Pi 4s running, each with a specific responsibility (and presumably all tied together over ethernet). There would be multiple microcontroller.
At this point, let's assume they are running micro-ROS. It provides a ready, ROS approved way of allowing each microcontroller to define publishers for the data they are collecting. And in the case of the motor driver it would subscribe to cmd_vel for motor control. The subsystems wouldn't be connected to each other, they would be independent. They could publish/subscribe messages if inter-component communication is necessary.
The Teensy 4.1 has support for direct ethernet connections, but might be a little overkill as an overseer of just one component. Teensy 4.0 is smaller and is the same size as the lesser Teensys, so.. why not? But with no ethernet support, each Teensy would need to connect via USB serial instead. There are each converters between TTL serial and USB serial, some built into the USB cord itself. And USB is used by the RealSense and Lidars, so it should be fine for our subsystems as well.
Instead of using micro-ROS at the microcontroller level, we could look at defining our own serial protocol that a custom ROS node read and then translates into messages for the topics. Doing this would mean that almost any microcontroller could be used at that point, not just the micro-ROS approved one.
Each subsystem could be developed and tested independently of everything else. It also means that different implementations of the subsystem could be swapped in so long as they match the set of messages and topics expected. Bart could have one hardware/software implementation for distance sensors, Homer could have a different hardware/software implementation. But with the same topics supported and messages generated.
I guess this sounds like a "duh, it's ROS stupid" sort of moment. This is exactly the kind of design that ROS is supposed to foster and support. I'm feeling that this is the most "true" to ROS kind of design that the ExampleBots should demonstrate. It might be a little much to have 3 or 4 Teensys, so design and write the code so that subsystems could be "grouped" on fewer controllers.
Thanks for reading, would like your opinion. Sorry if this "breakthrough" seems obvious to everyone.
-Mark