add message when actually received data
This commit is contained in:
parent
a1b0a33098
commit
1ae1dd2f2f
1 changed files with 5 additions and 1 deletions
|
@ -81,7 +81,11 @@ public:
|
|||
// Do callback
|
||||
std::cout << "Callback for subscriber of topic: " << subscriber->topic_name_ << std::endl;
|
||||
const void *ros_msg = 0;
|
||||
ros_middleware_interface::take(subscriber->subscriber_handle_, ros_msg);
|
||||
bool taken = ros_middleware_interface::take(subscriber->subscriber_handle_, ros_msg);
|
||||
if (taken)
|
||||
{
|
||||
std::cout << "- received message on topic: " << subscriber->topic_name_ << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue