Nodelets - Can the publisher and subscriber be in two different packages?
I'm trying my first implementation of nodelets for faster camera image acquisition and publishing. I have followed the nodelet implementation for the camera1394 ROS driver, and I have made this into a separate package. My doubt was regarding the subscriber. From what I understand, I can have the subscriber as its own package just inheriting from nodelet class and overloading the onInit method. Then for running the nodelets, I simply launch one nodelet_manager and launch the nodelet-publisher and nodelet-subscriber in that. The subscriber package does not need to depend on the publisher package. Is this correct?
The launch sequence on command-line would be:
- rosrun nodelet nodelet manager __name:=nodelet_manager
- rosrun nodelet nodelet load publisher_nodelet/image_publisher nodelet_manager __name:=image_publisher
- rosrun nodelet nodelet load subscriber_nodelet/image_subscriber nodelet_manager __name:=image_subscriber
All the tutorials on nodelets that I have seen show the subscriber and the publisher in the same package - which is what has caused this doubt. I was wondering if that was a requirement or just a simplification for the tutorials.
Thank you.