ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Nodelets - Can the publisher and subscriber be in two different packages?

asked 2013-12-02 05:13:53 -0500

NikhilD gravatar image

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:

  1. rosrun nodelet nodelet manager __name:=nodelet_manager
  2. rosrun nodelet nodelet load publisher_nodelet/image_publisher nodelet_manager __name:=image_publisher
  3. 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-06 21:31:52 -0500

tfoote gravatar image

Yes the nodelets loaded into the manager can come from any package on the system.

(Assuming it's been compiled etc.)

edit flag offensive delete link more

Question Tools



Asked: 2013-12-02 05:13:53 -0500

Seen: 858 times

Last updated: Dec 06 '13