|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
Interface for subscribers that can block while waiting for a message to be received on a topic. More...
#include <subscriber_interface.hpp>

Public Member Functions | |
| virtual | ~SubscriberInterface ()=default |
| virtual tl::expected< void, std::string > | initialize (const std::string &topic_name, const std::chrono::duration< double > &wait_for_message_timeout, const std::chrono::duration< double > &wait_for_publisher_timeout, bool bypass_qos_negotiation=false)=0 |
| Initialize the subscriber interface. | |
| virtual std::future< tl::expected< MessageT, std::string > > | getNextMessage ()=0 |
| Get a future for the next message through the subscriber interface. | |
| virtual tl::expected< MessageT, std::string > | syncGetNextMessage ()=0 |
| Get the next message through the subscriber interface (blocking). | |
| virtual void | halt ()=0 |
| Called to stop any long running processes. | |
Interface for subscribers that can block while waiting for a message to be received on a topic.
This interface is designed to be thread-compatible: initialize() and syncGetNextMessage() must be called synchronously, however halt() can be called from a separate thread. This interface can be easily mocked for testing to avoid needing to spin ROS nodes in tests.
| MessageT | ROS message type used to specialize this interface. |
|
virtualdefault |
|
pure virtual |
Get a future for the next message through the subscriber interface.
Implemented in moveit_studio::behaviors::RclcppSubscriberInterface< MessageT >.
|
pure virtual |
Called to stop any long running processes.
Implemented in moveit_studio::behaviors::RclcppSubscriberInterface< MessageT >.
|
pure virtual |
Initialize the subscriber interface.
| topic_name | Name of the topic to use in the subscriber interface. |
| wait_for_message_timeout | Message timeout duration to use in the subscriber interface. |
| wait_for_publisher_timeout | Publisher timeout duration to use in the subscriber interface. |
| bypass_qos_negotiation | If true, use default QoS instead of negotiating with publisher. |
Implemented in moveit_studio::behaviors::RclcppSubscriberInterface< MessageT >.
|
pure virtual |
Get the next message through the subscriber interface (blocking).
Implemented in moveit_studio::behaviors::RclcppSubscriberInterface< MessageT >.