Component Runtime#755
Conversation
05c0b36 to
80705ec
Compare
|
TL;DR: The component defines its own API, an the daemon exposes it through the existing robot interface. The contract:
|
80705ec to
07e0fa1
Compare
|
FYI since it came up, this approach would support any source, including non-Python apps, additional languages, etc. Component maintainers are able to bind whatever they want in init, including other languages or sources. A less obvious unlock is that this also means components are infinitely composable. There is no requirement to supply a complete library. A component can be a granular module, and an app can be a collection of calls to robot/integrated component/multiple standalone components. |
6871de8 to
31cfef6
Compare
31cfef6 to
4b7faf2
Compare
|
Thanks, that's an interesting discussion to have. What do you think of the plugin system proposed here #743 ? |
I can see how it could be useful for motion-based events. It’s not a problem I'm focused on, and I wasn’t involved in the related discussion or development. #743 addresses a narrower need in a different problem space. I would consider it separately if there is a desire for tighter component/robot integration. I'm envisioning something far more ambitious and less restrictive. Creating an extensible surface would allow external developers to explore freely without asking Pollen to take on any additional burdens. |
A dynamic component runtime that gives 3rd parties the option to bring their own hardware (or software tbh). Think: broad extensibility with external modules, without modifying daemon or SDK code. This is first-class integration for third-party devices.
The framework is laid out BUT I'm broadly flexible and happy to make further refinements/decisions and any necessary changes to align with the team's expectations.
I've established some baseline requirements:
From there, we can layer on some conceptual expectations:
That keeps the implementation simple, with the entire process looking something like this:
For Example:
Design rationale:
While we could support other sources or local folders, this type of inclusion can introduce additional challenges (management overhead, troubleshooting and debugging, security). A single, simple, manifest-driven source of truth, means we can turn things off/on very easily without having to know or understand any of the details. A text file as a control point means less-technical people have a simple installation process (also easy to add to dashboard as toggles).
The dedicated namespace means we don't have to be concerned about collisions or confusion, and the overhead is never a burden for the team. Dynamic loading is automatic and super straightforward (I've added placeholder comments to the daemon). If there's a problem it's always a component problem... the entire robot.component namespace is the responsibility of the corresponding 3rd party. For issues Pollen can always simply defer with something like "We are not involved with 3rd party components, you will need to speak with the developer of that component"
Component owners having to maintain this independently is a small price to pay. Devs get fully integrated access to their devices, the robot is never impacted, and Pollen doesn't have to know or care about those external integrations.
PyPi / GitHub / etc. are also possible, but given the low level access I think Hugging Face exclusivity makes sense, because it's the only place that provides a direct lever for HF (of all options it's the only one where you can pull the plug directly). That said, happy to enable whatever you want.
As for developers, requiring a component factory to be returned means they can implement as they please. This gives broad flexibility and control for 3rd party inclusions, without compromising the robot, and still maintaining a control point for HF. This unlock allows the community to freely extend Reachy without requiring Pollen's involvement.
Example: A researcher publishes alice/reachy-imu:v1.0.0 to add IMU support. Users add one line to their manifest. No review, no merge, no waiting, and no additional setup; apps then have direct access to the device through the robot interface. The contract is simple device exposure without any coupling.
Next steps:
Seeking additional thoughts and confirmation on approach. The code is pretty simple (see included changes) but I'll complete the draft when we've confirmed how we want to go about this.
Let me know if you have any questions, would like further clarification or changes, or whatever else I can do to make this easier to explore.