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

Revision history [back]

The best way is to create two sparated callbacks , and associate each callback to each topic with the subscribe() function (ros::NodeHandle::subscribe(), see this.

Otherwise, I don't see why you should use a single callback for both topics ? Do you have a motivation about this requirement ?

kind regards,

andreu