opencog / ghost_bridge

A ROS bridge between the Hanson Robotics stack and OpenCog's GHOST
GNU Affero General Public License v3.0
6 stars 11 forks source link

Create an OpenCog ROS node #5

Open linas opened 6 years ago

linas commented 6 years ago

This is a proposal that describes an "opencog ROS node", as a possible replacement for ghost_bridge. It is probably low-priority, for now, so not urgent. However, it might (maybe?) resolve certain kinds of performance problems. I'm not convinced that its even a good idea: but it is an interesting idea.

First: the "performance bottlenecks" in the current design are these: When the python ROS node receives sensory messages, it must send them to opencog (in some way). It currently sends them by opening a socket to the cogserver (which is running in a different process) and then sending asci//(utf-8) strings to the cogserver - the strings are various scheme commands. There is a fair amount of over-head in this: (a) the operating system must switch between processes (low-cost as they run on different cores) and different memory maps (TLB entries, etc.) (b) socket i/o (c) the guile interpreter needs to run.

One alternative to this is to start and run opencog in ROS, itself (although opencog would need to run in a different thread that ROS). Pros and cons:

The above, last bullet, explains why this is an interesting idea, but might not actually be practical for ghost_bridge.

See https://github.com/opencog/benchmark/issues/9#issuecomment-392015975 for initial proposal and additional discussion.

jdddog commented 6 years ago

Thanks Linas. We want to explore a more interoperable way to interface OpenCog with other systems (not just ROS), but we are currently finishing a project and are not ready to work on this yet. I would be happy to discuss it in a couple of weeks time.