Total Pageviews

Friday, July 12, 2013

Configure ROS package rosserial on Ubuntu

Some commonly missing step after install arduino IDE is forget to add yourself into "dialout" and "tty" group. You can do so by the following command.

$sudo usermod -a -G tty yourUserName
$sudo usermod -a -G dialout yourUserName

To use rosserial, after you have done everything in the rosserial's tutorial and try to complie (or verify) your code you might got an error message like the following :

In file included from /Users/kevin/Documents/Arduino/libraries/ros_lib/ros.h:39,
             from HelloWorld.cpp:6:
  /Users/kevin/Documents/Arduino/libraries/ros_lib/ArduinoHardware.h:38:22: error: WProgram.h: No such file or directory

You fix it by go to the mentioned file, in this case, located at "/Users/kevin/Documents/Arduino/libraries/ros_lib/"

$cd /Users/kevin/Documents/Arduino/libraries/ros_lib/
$gedit ArduinoHardware.h

Replace the line "#include WProgram.h" with the following

  #if defined(ARDUINO) && ARDUINO >= 100
 #include "Arduino.h"
 #include "WProgram.h"

Go back to the IDE and compile the code again, and it should be fine. 

No comments:

Post a Comment