Custom ros.h when using rosserial_arduino can not include node_handle.h

asked 2018-05-14 15:44:45 -0600

prex gravatar image

updated 2018-05-14 15:45:45 -0600

I tried to configure the number of publishers and subscribers according to this tutorial:

http://wiki.ros.org/rosserial_arduino...

To set it up only for one project, I put a ros.h file in my Arduino project folder. I want to leave all the other files as they are in the libraries/ros_lib folder. But following the tutorial and writing (in the ros.h)

#ifndef _ROS_H_
#define _ROS_H_

#include "ros/node_handle.h"
#include "ArduinoHardware.h"

leads to the error:

In file included from /home/student/Arduino/arduino_stepper_controller_drv8825/asc_node/asc_node.ino:10:0:
sketch/ros.h:4:29: fatal error: ros/node_handle.h: No such file or directory
 #include <ros/node_handle.h>
                             ^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.

How can I include it correctly, even if my .ino reffers to a ros.h in the project folder?

I'm using Arduino IDE on Ubuntu 16.04 and ROS Kinetic.

edit retag flag offensive close merge delete