ROS internals - topics storage and network comms?
I am currently working on a software framework to monitor the energy consumption of robots or any embedded device. I wanted to build my framework in a similar manner as ROS.
At the moment, I have created a user API that does the following (front end):
- a user can create a probe (a data structure used to collect data from an energy source) and associate it with a device attached to the embedded board.
- set a checkpoint with respect to any probe that is already created; once set, energy monitoring of the corresponding device begins.
- A user can 'sampleCheckpoint' at which point the latest energy reading collected from the corresponding device is returned.
- Finally, a user can also delete checkpoints and probes.
This framework allows users to profile their code for energy consumption.
The backend:
The architecture of the system is built in a producer-consumer fashion (similar to ROS), where energy sources are the producers and any software using the API are consumers. There is a central authority in between that stores checkpoints and probe related data in an sqlite database. And all communications between producers and consumers happen via this central authority over unix sockets.
- Does ROS also use UNIX sockets to do all its network communications?
- Does ROS store all the topics & subscribers associated with each topic in a database of some sort or just in memory?
I would also like to integrate this framework with ROS at some point. In order to do that, I believe I need to create a ROS package for the framework?
Thank you.
Some nitpicking: ROS (the middleware) is built upon publish-subscribe and a flavour of RPC (or implicit and explicit invocation). While similar, a plain producer-consumer system is not the same.
Thanks for pointing that out.