How to subscribe to ros_arduino_msgs?
I'm using the ROSArduinoBridge to connect an ODROID to an Arduino and I'd like to subscribe to a digital sensor topic that the ROSArduinoBridge is publishing. I can't figure out the C++ syntax to be able to do this. Has anyone ever done this before and would be able to help me figure this out? I've checked the basic ROS Subscriber tutorials and tried to #include "ros_arduino_msgs/Digital.h", but the compiler says it can't find that file and I don't know what it should be. Any help would be appreciated, thanks!
This should be no different than subscribing to any other topic, provided you have all the right includes set up and your dependencies declared correctly.
Please include your
CMakeLists.txt
andpackage.xml
and a snippet of code showing your#include
s andSubscriber
.Thanks for the help! Looks like I had set up the dependencies wrong and I found the correct way after a little searching. I'll post how I did it as an answer.