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
[..]
 //Topics to subscribe
multiSubscriber = node.subscribe("fcu/status", msg_queue_size, &statusCallback);
multiSubscriber = node.subscribe("fcu/current_pose", msg_queue_size, &poseCallback); 
[..]

This is your problem: you cannot subscribe to multiple topics with the same Subscriber instance. There is a one-to-one correspondence between subscriptions and subscribers (at least in ROS1).

[..]
 //Topics to subscribe
multiSubscriber = node.subscribe("fcu/status", msg_queue_size, &statusCallback);
multiSubscriber = node.subscribe("fcu/current_pose", msg_queue_size, &poseCallback); 
[..]

This is your problem: you cannot subscribe to multiple topics with the same Subscriber instance. There is a one-to-one correspondence between subscriptions and subscribers (at least in ROS1).