0
$\begingroup$

Rosanswers logo

Hello , i'm trying to compile the examples for Arduino, for example the Hello_World (or whatever) and i got this error:

HelloWorld.pde:-1: error: ‘ros’ has not been declared
HelloWorld.pde:-1: error: expected constructor, destructor, or type conversion before ‘nh’
HelloWorld.pde:-1: error: ‘std_msgs’ has not been declared
HelloWorld.pde:-1: error: expected constructor, destructor, or type conversion before ‘str_msg’
HelloWorld.pde:-1: error: ‘ros’ has not been declared
HelloWorld.pde:-1: error: expected constructor, destructor, or type conversion before ‘chatter’
HelloWorld.cpp: In function ‘void setup()’:
HelloWorld.pde:-1: error: ‘nh’ was not declared in this scope
HelloWorld.pde:-1: error: ‘chatter’ was not declared in this scope
HelloWorld.cpp: In function ‘void loop()’:
HelloWorld.pde:-1: error: ‘str_msg’ was not declared in this scope
HelloWorld.pde:-1: error: ‘chatter’ was not declared in this scope
HelloWorld.pde:-1: error: ‘nh’ was not declared in this scope

i'm working on ROS Electric, I really Need Help!


Originally posted by monidiaz on ROS Answers with karma: 92 on 2013-07-02

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

The ros_lib should be installed in your Arduino "sketchbook/libraries". You will have to make the libraries folder and the sketchbook should automatically be generated in the home directory after the Arduino IDE is opened once. Using this command mkdir -p ~/sketchbook/libraries and then cd ~/sketchbook/libraries to should get you into the right folder. To install the ros_lib in the sketchbook use rosrun rosserial_arduino make_libraries.py . As davinci said this is in the setup.


Originally posted by tonybaltovski with karma: 2549 on 2013-07-02

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by monidiaz on 2013-07-03:
it's dosn't work :/ when i ran rosrun rosserial_arduino make_libraries.py i got this error [rosrun] Couldn't find executable named make_libraries.py below /opt/ros/electric/stacks/rosserial/rosserial_arduino

Comment by tonybaltovski on 2013-07-03:
Try installing rosserial from source.

Comment by monidiaz on 2013-07-03:
http://www.ros.org/wiki/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup , i did it :/

$\endgroup$
0
$\begingroup$

Rosanswers logo

Did you follow all the steps in the setup? And copied the libraries? Seems that it can't find your libraries.


Originally posted by davinci with karma: 2573 on 2013-07-02

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by monidiaz on 2013-07-02:
yes, i did't por that i don't know what it's going wrong.

Comment by monidiaz on 2013-07-02:
suppose that the opt/ros/electric/stacks/rosserial/rosserial_arduino/libraries/ros_lib it's copied on the sketchbook folder

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.