0
$\begingroup$

Rosanswers logo

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):

  1. 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.
  2. set a checkpoint with respect to any probe that is already created; once set, energy monitoring of the corresponding device begins.
  3. A user can 'sampleCheckpoint' at which point the latest energy reading collected from the corresponding device is returned.
  4. 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.

  1. Does ROS also use UNIX sockets to do all its network communications?
  2. 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.


Originally posted by JaysonJT on ROS Answers with karma: 3 on 2014-04-11

Post score: 0


Original comments

Comment by gvdhoorn on 2014-04-11:
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.

Comment by JaysonJT on 2014-04-11:
Thanks for pointing that out.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To answer your questions:

1 . Does ROS also use UNIX sockets to do all its network communications?

No, it uses TCP/IP for nodes (to cross process boundaries), and pointer-passing in nodelets (essentially nodes mapped on threads).

2 . Does ROS store all the topics & subscribers associated with each topic in a database of some sort or just in memory?

Plain ROS (ie: no extensions providing additional transports) uses in-memory buffering for messages, and a special node (the master) as a central index to provide topic->node mapping services. AFAIK that mapping is stored in memory, no databases (if you mean (R)DBMS) involved. Node->node communication is also direct, so the master is only involved in the initial setup of the connection.


Edit: see also the ROS/Concepts wiki page.


Originally posted by gvdhoorn with karma: 86574 on 2014-04-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by JaysonJT on 2014-04-11:
Thanks for your reply. I've just read that nodes send messages to each other via topics. So is a topic a 'name (char *) + memory buffer (user definable datatype)' data-structure? And, does the master keep a track of all the topics in a linked-list data-structure? Thanks.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.