ClearSnapshot Class
Sends a request to clear the existing Octomap and Pointcloud snapshots. More...
Declaration
Included Headers
Base class
| class | ServiceClientBehaviorBase<ServiceT> |
|
A base class for behaviors which need to send a request to a ROS service client and wait for a result. More... | |
Public Constructors Index
| ClearSnapshot (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
|
Constructor for the ClearSnapshot Behavior. More... | |
Private Member Functions Index
| tl::expected< std::string, std::string > | getServiceName () override |
|
Returns the name of the service, which is a constant value for this behavior. More... | |
| tl::expected< std_srvs::srv::Empty::Request, std::string > | createRequest () override |
|
Creates a std_srvs::srv::Empty::Request message. More... | |
| tl::expected< bool, std::string > | processResponse (const std_srvs::srv::Empty::Response &response) override |
|
Publishes an Event message when the service response is received. More... | |
| 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. More... | |
Private Member Attributes Index
| std::shared_ptr< rclcpp::Publisher< moveit_studio_agent_msgs::msg::Event > > | event_publisher_ |
|
Publish an event to notify when a snapshot has been removed. More... | |
| std::shared_future< tl::expected< bool, std::string > > | future_ |
|
Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More... | |
Public Static Functions Index
| static BT::PortsList | providedPorts () |
|
Returns list of ports for this behavior. Always empty for this node. More... | |
| static BT::KeyValueVector | metadata () |
Description
Sends a request to clear the existing Octomap and Pointcloud snapshots.
Definition at line 21 of file clear_snapshot.hpp.
Public Constructors
ClearSnapshot()
| explicit |
Constructor for the ClearSnapshot Behavior.
- Parameters
-
name config shared_resources
Declaration at line 30 of file clear_snapshot.hpp, definition at line 25 of file clear_snapshot.cpp.
Private Member Functions
createRequest()
| inline virtual |
Creates a std_srvs::srv::Empty::Request message.
- Returns
Always returns the Empty::Request message.
Definition at line 55 of file clear_snapshot.hpp.
getFuture()
| inline virtual |
Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.
Definition at line 71 of file clear_snapshot.hpp.
getServiceName()
| inline virtual |
Returns the name of the service, which is a constant value for this behavior.
- Returns
Always returns the constant service name.
Definition at line 46 of file clear_snapshot.hpp.
processResponse()
|
Publishes an Event message when the service response is received.
- Parameters
-
response Unused, since Empty::Response contains no data.
- Returns
Always returns True.
Declaration at line 65 of file clear_snapshot.hpp, definition at line 43 of file clear_snapshot.cpp.
Private Member Attributes
event_publisher_
|
Publish an event to notify when a snapshot has been removed.
Definition at line 68 of file clear_snapshot.hpp.
future_
|
Classes derived from AsyncBehaviorBase must have this shared_future as a class member.
Definition at line 77 of file clear_snapshot.hpp.
Public Static Functions
metadata()
| static |
Declaration at line 39 of file clear_snapshot.hpp, definition at line 37 of file clear_snapshot.cpp.
providedPorts()
| static |
Returns list of ports for this behavior. Always empty for this node.
- Returns
BT::PortsList
Declaration at line 37 of file clear_snapshot.hpp, definition at line 32 of file clear_snapshot.cpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.