Ask Your Question

rosserial_arduino and Arduino IDE 1.0 rc2

asked 2011-11-03 09:50:48 -0600

mcsmith gravatar image

updated 2014-01-28 17:10:42 -0600

ngrennan gravatar image

I'm a newbie to ROS, rosserial and Arduino. Nonetheless, I'm trying my hand at doing some development. When I tried to compile the rosserial_arduino example for HelloWorld using the Arduino IDE (1.0 rc2), it wouldn't compile as a result of the renaming of "Wprogram.h" to "Arduino.h". I solved the problem by editing ArduinoHardware.h to replace:

#include <Wprogram.h>


#if ARDUINO>=100
#include <Arduino.h> // Arduino 1.0
#include <Wprogram.h> // Arduino 0022

Hopefully (1) this is the preferred solution and (2) it gets propagated into the rosserial package.

edit retag flag offensive close merge delete


This is cool, man. Thanks a lot!

AzureViolin gravatar imageAzureViolin ( 2012-03-20 19:08:11 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2011-11-03 12:11:38 -0600

fergs gravatar image

Thanks for the patch -- in the future, feel free to file a ticket on our Kforge Trac:

edit flag offensive delete link more


Is there a plan to push this fix out in the debs? Still seems to be broken in ros-fuerte-rosserial.

mikepurvis gravatar imagemikepurvis ( 2012-08-16 04:56:47 -0600 )edit

answered 2012-06-24 23:49:18 -0600

Kiara gravatar image

Thanks a lot! This has been very useful :)

edit flag offensive delete link more

answered 2012-12-05 06:12:33 -0600

DrBot gravatar image

My workaround was much simpler. In the .../ardiuno_1.0.?/hardware/arduino/cores/arduino directory: cp Arduino.h WProgram.h after this the string test compiled. I have no idea if it will actually work with ROS, but a step forward.

edit flag offensive delete link more

answered 2012-08-16 05:31:51 -0600

Here's a workaround which allows you to use the rosserial_arduino debs unmodified:

  • In your package, add a file called hack/WProgram.h, with these contents:

#include "Arduino.h"

  • In CMakelists.txt, somewhere before the final macro call, add:

include_directories(hack ${ARDUINO_SDK_PATH}/hardware/arduino/variants/standard)

This should let you compile the package with cmake, and should be a forward-friendly fix for once rosserial is updated.

edit flag offensive delete link more


This isn't very helpful to me. I have no idea where to add the hack file, how to modify Cmake and how to recompile the package. The information about getting ROS and IDE 1.0 is confusing and contradictory. Not everyone re-compiles from source everyday.

DrBot gravatar imageDrBot ( 2012-12-05 05:53:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-11-03 09:50:48 -0600

Seen: 733 times

Last updated: Dec 05 '12