rosserial arduino use PROGMEM in ros_lib
Hi all,
as stated here ( http://arduino.cc/en/pmwiki.php?n=Tut... ) adruinos usually do not have much SRAM and it is easy to use it all up by using many constant strings
Notice that there's not much SRAM available in the Uno. It's easy to use it all up by having lots of strings in your program.
<sarcasm warning> The nice feature of the arduino IDE in this cases is that it does not fail to compile or upload but only the arduino programm will run 'strangely' </sarcasm warning>
If you run out of SRAM, your program may fail in unexpected ways; it will appear to upload successfully, but not run, or run strangely. To check if this is happening, you can try commenting out or shortening the strings or other data structures in your sketch (without changing the code). If it then runs successfully, you're probably running out of SRAM.
I have observed this behaviour with my arduino code that uses ros_lib. One of the causes is that ros_lib stores for each topic (publish/subscribe) 3 strings ( md5sum, message type name and topic name ). Particularly if I use topics with namespaces if have observed the problem on arduino uno after setting up only 3 or 4 topics.
How the question: Has anyone considered modifying the message generator for Ardunio such that it uses PROGMEM for storing md5sum, topic and stuff? (Or is it even possible?)
http://www.arduino.cc/en/Reference/PR...
The data is static and I think this would significantly reduce the SRAM usage....
Thank you!
Edit 22.09.: anyone?
You might want to try and just report this as an issue over at the ros-drivers/rosserial github repo. Do refer to this post in your issue.