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

Revision history [back]

click to hide/show revision 1
initial version

Are you asking how to subscribe to two topics with one node?

You can simply create multiple Subscribers, so in the tutorial http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

ros::Subscriber sub1 = n.subscribe("chatter1", 1000, chatterCallback1);
ros::Subscriber sub2 = n.subscribe("chatter2", 1000, chatterCallback2);

and similarly in python.