24#include <rclcpp/rclcpp.hpp>
29namespace client_behaviors
31using namespace std::chrono_literals;
35template <
typename TMessage>
50 rclcpp::SensorDataQoS
qos;
54 getLogger(),
"[CbWaitTopicMessage] waiting message from topic: "
62 std::function<
void(
typename TMessage::SharedPtr)> fn = [
this](
auto msg)
81 typename rclcpp::Subscription<TMessage>::SharedPtr
sub_;
virtual rclcpp::Logger getLogger() const
virtual rclcpp::Node::SharedPtr getNode() const
virtual ~CbWaitTopicMessage()
void onMessageReceived(const typename TMessage::SharedPtr msg)
CbWaitTopicMessage(const char *topicname, std::function< bool(const TMessage &)> guardFunction=nullptr)
std::function< bool(const TMessage &)> guardFn_
rclcpp::Subscription< TMessage >::SharedPtr sub_