ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

(shared) cognitive memory programming paradigm in ROS

asked 2013-09-21 06:57:02 -0500

fferri gravatar image

updated 2013-10-02 13:01:52 -0500

being message based, ROS allows only topic advertising/publishing/subscribing (broadcast message paradigm), and service calls (client/server paradigm).

some cognitive architectures have another paradigm, based on a shared working memory, i.e.:

  • a node can write some data in the working memory;
  • a node can subscribe to changes happening in the working memory, based on type of the data, content of the data, or whom is making the change;
  • a node can remove some data from the working memory;
  • a node can change some data in the working memory;
  • a newly started node, can immediately know all data present in the working memory.

did something like this already exist in ROS? otherwise, it could be implemented on top of the already existing communication primitives, and providing a library for the clients, and one additional node for keeping the memory persistent during the session.

pros? cons?

I found myself needing such a shared memory paradigm for an application (involving high level control of the robot and planning), and instead of coding everything into my node, I'd like to decouple this concept, as it could be re-used for a zillion other different applications inside ROS.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-09-21 07:07:04 -0500

There is the Nodelets concept. Maybe not exactly what you are looking for, but can be of some help.

It is designed primarily for high-throughput applications and implements zero-copy mechanism to achieve high performance.

edit flag offensive delete link more

answered 2013-09-23 04:06:26 -0500

fferri gravatar image

updated 2013-10-02 13:05:31 -0500

@Boris (sorry, my reply was too long to fit in a comment)

the kind of shared memory found in cognitive architectures is a (possibly distributed) shared memory. the big advantage of ROS is enabling developers to distribute the nodes/computation across a network.

from what I read, nodelets provide ipc shared memory, which are motivated by other needs (performance), while the distributed shared memory is just another programming paradigm (at the lower level, it would still be implemented with message exchange already provided by ROS)

EDIT: is there a reason why ROS has been designed without this paradigm readily available? I mean, it's since the beginning that ROS provides only messages, services, and params, and although this memory concept can be easily implemented thru a couple of services and some topic broadcasting (and in fact I implemented a preliminary version of it in less than 150 lines of python code, it has not been made... so I was wondering

edit flag offensive delete link more

Question Tools



Asked: 2013-09-21 06:57:02 -0500

Seen: 393 times

Last updated: Oct 02 '13