Including Publisher/Subscriber/NodeHandle without "ros.h"

asked 2019-11-19 05:44:29 -0500

mhyde64 gravatar image

updated 2019-11-19 06:12:52 -0500

gvdhoorn gravatar image

I have a simple questions but can't seem to find any info.

I am using an Arduino as an action node. Eventually, the node will not need the ros.h header at all but in my testing I decided to set it up as a subscriber just to get my function to work.

This brought up the question... Can I include Pusblisher/Subscriber and other ROS headers without including the full ros.h? I found the headers I'm looking for under ros_lib/ros/publisher.h / subscriber.h/ nodehandle.h .... but using

#include "ros/publisher.h"

doesn't work.

How can I include these headers specifically to save space in the arudino RAM?

LET ME KNOW WHAT OTHER INFO YOU MAY NEED. I am in a coffee shop about to leave on a business trip so I didn't have much time to give much detail...sorry and thank you!

edit retag flag offensive close merge delete


I've retagged this rosserial and rosserial_arduino, as roscpp is not used on Arduinos and you mention ros_lib, which is a rosserial artefact.

Please know that rosserial != roscpp, and that you cannot necessarily use answers for one for the other.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-19 06:13:34 -0500 )edit