Rosanswers logo

I install ros_lib into the arduino environment. When I try compile HellowWorld, I have error:

 In file included from /home/tuuzdu/sketchbook/libraries/ros_lib/ros/node_handle.h:38:0,
                     from /home/tuuzdu/sketchbook/libraries/ros_lib/ros.h:38,
                     from HelloWorld.pde:6:
    /opt/ros/hydro/include/std_msgs/Time.h:42:18: fatal error: string: No such file or directory
    compilation terminated.

File /opt/ros/hydro/include/std_msgs/Time.h exists.

Originally posted by tuuzdu on ROS Answers with karma: 85 on 2014-07-04

Post score: 1

Original comments

Comment by Wolf on 2014-07-05:
Did your rosrun rosserial_arduino make_libraries.py call run without errors/warnings? Does Time.h exist somewhere in a subfolder of your /home/tuuzdu/sketchbook/libraries/ros_lib/?

Comment by tuuzdu on 2014-07-06:
I have this problem on 64bit machine and I have not problem on 32bit machine. Both machines with Ubuntu 13.04 and ROS Hydro. On 32bit make_libraries.py creates headers in ros_lib folder: std_msgs, rosserial_msgs and others.But on 64bit not! I try copy header primary-to-secondary, but it hasnt effect


1 Answer 1


Rosanswers logo

Perhaps ROS is not in the path of the utility you are using... But the error seems to be pointing to the following segment of Time.h:


#include <string> //This line here is line 42
#include <vector>
#include <map>

#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>

So I'd say it's got to do with rosserial's PATH. Unfortunately, I'm not an expert on this... I've used it only slightly. If you are launching from the system, try launching from a terminal. Perhaps this is like the issue with QtCreator... You can only use it in a terminal in order to get the right paths linked. Please note that this is simply speculation, though...

Keep us posted! This could definitely be helpful for others in the future.

Originally posted by allenh1 with karma: 3055 on 2014-07-06

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by tuuzdu on 2014-07-06:
Yes, I launch Arduino IDE from terminal with all necessary environment variables. Please see comment above.

Comment by fyi on 2020-12-28:
did you get a solution to this?


Your Answer

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