Ask Your Question

Revision history [back]

rosserial too big for Arduino

I am trying to add a magnetometer to my robot by plugging it into an Arduino and publishing the data using MagneticField message. I can't compile my code for Arduino Uno or Leonardo while at the same time using the Adafruit Magnetometer driver . I end up with this error message:

Global variables use 2,675 bytes (104%) of dynamic memory, leaving -115 bytes for local variables. Maximum is 2,560 bytes.

I only defined the necessary variables as globel (ros handle, publisher, message to publish and sensorlib instance). Did anybody figure out a way to work with such sensors on an Arduino and publishing their data using ROS?