ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You might try this approach:
Main loop follows the logic below.
while (ros::ok()) {
nh.spinOnce();
if (droppedMessageCount > 0) {
ROS_ERROR("%d messages were dropped", droppedMessageCount);
}
droppedMessageCount = 0;
if (message queue not empty) {
take first message from queue and process it
}
}
This doesn't use any ROS facilities to find out if messages are dropped, but would allow your node to give an indication in the log.