|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
A behavior that subscribes to a topic that can be used for pausing an objective during execution to allow introspection. This behavior will listen on the configured topic for a True/False message which will cause it to continue or abort from a breakpoint that is included in an objective. More...
#include <breakpoint_subscriber.hpp>


Public Member Functions | |
| BreakpointSubscriber (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| BreakpointSubscriber (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< SubscriberInterface< std_msgs::msg::Bool > > subscriber_interface, std::unique_ptr< PublisherInterfaceBase< std_msgs::msg::String > > encountered_publisher_interface, std::unique_ptr< PublisherInterfaceBase< std_msgs::msg::String > > resumed_publisher_interface) | |
| Constructor with injected interfaces for testing. | |
Public Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase | |
| AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| virtual | ~AsyncBehaviorBase ()=default |
| BT::NodeStatus | onStart () override |
| Required implementation of BT::StatefulActionNode::onStart(). | |
| BT::NodeStatus | onRunning () override |
| Required implementation of BT::StatefulActionNode::onRunning(). | |
| void | onHalted () override |
| Required implementation of BT::StatefulActionNode::onHalted(). | |
| void | resetStatus () |
| Resets the internal status of this node. | |
Public Member Functions inherited from moveit_studio::behaviors::SharedResourcesNode< BT::StatefulActionNode > | |
| SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node. | |
Static Public Member Functions | |
| static BT::PortsList | providedPorts () |
| static BT::KeyValueVector | metadata () |
Protected Member Functions | |
| tl::expected< bool, std::string > | doWork () override |
| Function called in the async process thread after the behavior starts running. | |
| tl::expected< void, std::string > | doHalt () override |
| Stops message checking if in progress. | |
| std::shared_future< tl::expected< bool, std::string > > & | getFuture () override |
| Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. | |
Protected Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase | |
| void | notifyCanHalt () |
| Called when runAsync() finishes to notify onHalted() that the async process has finished. | |
Additional Inherited Members | |
Protected Attributes inherited from moveit_studio::behaviors::SharedResourcesNode< BT::StatefulActionNode > | |
| std::shared_ptr< BehaviorContext > | shared_resources_ |
A behavior that subscribes to a topic that can be used for pausing an objective during execution to allow introspection. This behavior will listen on the configured topic for a True/False message which will cause it to continue or abort from a breakpoint that is included in an objective.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| breakpoint_topic | Input | std::string |
/breakpoint_topic_name the user can enter the following in a terminal to continue. If the value of data is False then the objective will be aborted. ros2 topic pub -1 /breakpoint_topic_name std_msgs/msg/Bool "{data: True}" | moveit_studio::behaviors::BreakpointSubscriber::BreakpointSubscriber | ( | const std::string & | name, |
| const BT::NodeConfiguration & | config, | ||
| const std::shared_ptr< BehaviorContext > & | shared_resources | ||
| ) |
| moveit_studio::behaviors::BreakpointSubscriber::BreakpointSubscriber | ( | const std::string & | name, |
| const BT::NodeConfiguration & | config, | ||
| const std::shared_ptr< BehaviorContext > & | shared_resources, | ||
| std::unique_ptr< SubscriberInterface< std_msgs::msg::Bool > > | subscriber_interface, | ||
| std::unique_ptr< PublisherInterfaceBase< std_msgs::msg::String > > | encountered_publisher_interface, | ||
| std::unique_ptr< PublisherInterfaceBase< std_msgs::msg::String > > | resumed_publisher_interface | ||
| ) |
Constructor with injected interfaces for testing.
|
overrideprotectedvirtual |
Stops message checking if in progress.
Halts the subscriber interface to interrupt waiting for messages.
Reimplemented from moveit_studio::behaviors::AsyncBehaviorBase.
|
overrideprotectedvirtual |
Function called in the async process thread after the behavior starts running.
Initializes the subscriber, waits for a message on the breakpoint topic, and publishes notifications about breakpoint status.
Implements moveit_studio::behaviors::AsyncBehaviorBase.
|
inlineoverrideprotectedvirtual |
Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.
Implements moveit_studio::behaviors::AsyncBehaviorBase.
|
static |
|
static |