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

Revision history [back]

click to hide/show revision 1
initial version

An Arduino Uno only has 2kb of RAM available. Because of the non-von-Neumann architecture of the Atmel chip, some things that you would not consider as variables also take up some of that space, specifically string constants, of which rosserial has a lot. I have not been able to make rosserial work reliably in a 2kb Arduino compatible. (You can tweak the buffer sizes some, but will eventually run out of space if you have enough publishers and subscribers.)

Some suggestions:

  1. Look at the amount of free variable space. This is shown in the Arduino IDE when you compile. The free space is used for the stack, so you must have sufficient space. I've had stability problems with anything under 600-800 bytes free.
  2. If #1 is a problem, try reducing the size of the input and output buffers, or reducing the number of publishers or subscribers. (Perhaps by combining multiple messages into one, for example.)
  3. Consider a non-rosserial approach such as ros_arduino_bridge, which is must less memory-intensive on the Arduino side. (I've abandoned rosserial in favor of ros_arduino_bridge for this reason.)