Integration of energy framework with ROS
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. (I have also created the back-end but is not relevant to the question I want to ask, so I am not including its details here.)
Is it possible to integrate my framework with ROS? For example, I would like to profile devices attached to a central machine running ROS. Is it possible to set checkpoints and sample them within a node process, along with the rest of the ROS API? If yes, may I know how I would go about doing this?
Thank you very much.