Trouble Installing hardware_interface library Arduino IDE

asked 2020-05-11 15:28:32 -0500

tdam2112 gravatar image

Hello all, I'm trying to implement the diff_drive_cintroller ros_controller for my robotics project. I need to have the arduino interface with ros on my computer for navigation information and I stumbled upon http://wiki.ros.org/diff_drive_contro... which seems to be ideal for my current project.

I'm now trying to implement the hardware interface component from ros_control http://wiki.ros.org/hardware_interfac... although I'm having trouble compiling my arduino sketch after including the hardware_interface library.

It appears from the error that my Arduino IDE doesn't recognize the .h files in the library although it is able to find the path to them.

The error I receive is:

In file included from controller.ino:14:0: /home/sketchbook/libraries/hardware/joint_command_interface.h:33:19: fatal error: cassert: No such file or directory compilation terminated

The code I used to call the library is as follows:

#include <joint_command_interface.h>
#include <joint_state_interface.h>
#include <robot_hw.h>

I took the library out of ros_control to the sketchbook/library folder as shown in the arduino website https://www.arduino.cc/en/guide/libra... trying to include it as a zipfile as well but with no luck.

I'm not sure what I'm missing to install this library, although I've seen multiple examples of the library being used with arduinos I have not seen anyone with this issue online or any indication on how to install the library in the Arduino IDE.

Any help is welcome, thanks :)

edit retag flag offensive close merge delete

Comments

The hardware_interface package cannot be included verbatim into an Arduino sketch. It's not designed for that sort of usage.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-12 04:43:37 -0500 )edit

I see! Should the hardware_interface node be applied in the computer side? looking more closely at the diagram explaining the control pipeline for ros_control https://sir.upc.edu/projects/rostutor... it shows that it communicates with the actuator via read() and write() through usb,serial etc. So perhaps I missunderstood the use. Should I create a hardware_interface node within the computer and have a rosserial node serve as the serial bridge for the read() and write() functions to the arduino?

tdam2112 gravatar image tdam2112  ( 2020-05-12 12:46:23 -0500 )edit