user2477181
user2477181

Reputation: 13

Using ROS vs other method (see post for more details on this "other method")

so I am working with a friend in developing a robot (using a Raspberry Pi). This robot we are working on will be an autonomous boat. Now, for the Raspberry Pi, the Raspbian image we are using already has ROS (specifically, ROS Kinetic) nicely installed on it, and I have confirmed that ROS is working.

For our robot boat, we have different features that we wish to include in it:

  1. Getting GPS location
  2. Getting audio via hydrophone and processing audio to detect a certain frequency range (ie. I want the boat to detect when a sound of 8500-9000 Hz is clearly heard via the hydrophone)
  3. Being able to communicate over XBee

So I have used ROS in the past and I am familiar with the concept of publishing and subscribing to topics. However, my friend says that ROS will cause performance issues due to ROS having some "overhead", claiming that ROS will slow down our audio processing or something.

Instead, he proposes the following alternative method:

  1. Have each of the 3 aspects of our robot (as mentioned above) in different Python files.
  2. When the Raspberry Pi starts up, have all of the Python files be run automatically.
  3. To pass information to each other (essentially "mimicking" the publishing/subscribing functionality of ROS), the Python files will write to different text files (to "publish" values) and read from those text files (to "subscribe"), and the values that these text files contain will be overwritten on each update of a new value.

So... which method of passing information is the better method for our robot?

  1. Using ROS
  2. Using the aforementioned file writing/reading method proposed by my friend
  3. Something else

Oh, and other things that I should mention:

  1. I know how to use ROS, my friend doesn't
  2. My friend has not actually finished writing all the code for doing his file writing/reading idea, whereas ROS is already all setup and good to go on the Raspberry Pi

While I could find plenty of sites that list the various advantages of ROS, I could not find anything that compares ROS to my friend's method that I have mentioned above.

Upvotes: 0

Views: 254

Answers (1)

kutschkem
kutschkem

Reputation: 8163

ROS has nodelets which allow multiple nodes to live in the same process and communicate with each other without copy overhead - so less overhead than writing a file would incur.

http://wiki.ros.org/nodelet

Upvotes: 1

Related Questions