Skip to main content

ClearSnapshot Class

Sends a request to clear the existing Octomap and Pointcloud snapshots. More...

Declaration​

class moveit_pro::behaviors::ClearSnapshot { ... }

Included Headers​

#include <clear_snapshot.hpp>

Base class​

classServiceClientBehaviorBase<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::PortsListprovidedPorts ()

Returns list of ports for this behavior. Always empty for this node. More...

static BT::KeyValueVectormetadata ()

Description​

Sends a request to clear the existing Octomap and Pointcloud snapshots.

Definition at line 21 of file clear_snapshot.hpp.

Public Constructors​

ClearSnapshot()​

moveit_pro::behaviors::ClearSnapshot::ClearSnapshot (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)
explicit

Constructor for the ClearSnapshot Behavior.

Parameters
name

See SharedResourcesNode

config

See SharedResourcesNode

shared_resources

See SharedResourcesNode

Declaration at line 30 of file clear_snapshot.hpp, definition at line 27 of file clear_snapshot.cpp.

Private Member Functions​

createRequest()​

tl::expected< std_srvs::srv::Empty::Request, std::string > moveit_pro::behaviors::ClearSnapshot::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()​

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::ClearSnapshot::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()​

tl::expected< std::string, std::string > moveit_pro::behaviors::ClearSnapshot::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()​

tl::expected< bool, std::string > moveit_pro::behaviors::ClearSnapshot::processResponse (const std_srvs::srv::Empty::Response & response)

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 45 of file clear_snapshot.cpp.

Private Member Attributes​

event_publisher_​

std::shared_ptr<rclcpp::Publisher<moveit_studio_agent_msgs::msg::Event> > moveit_pro::behaviors::ClearSnapshot::event_publisher_

Publish an event to notify when a snapshot has been removed.

Definition at line 68 of file clear_snapshot.hpp.

future_​

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::ClearSnapshot::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()​

BT::KeyValueVector moveit_pro::behaviors::ClearSnapshot::metadata ()
static

Declaration at line 39 of file clear_snapshot.hpp, definition at line 39 of file clear_snapshot.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::ClearSnapshot::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 34 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.