Robotics StackExchange | Archived questions

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

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!

Asked by mhyde64 on 2019-11-19 06:44:29 UTC

Comments

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.

Asked by gvdhoorn on 2019-11-19 07:13:34 UTC

Answers