Skip to main content

RetrievePoseParameter Class

Retrieves a stamped pose from the MoveIt Pro parameter manager node. More...

Declaration

class moveit_pro::behaviors::RetrievePoseParameter { ... }

Included Headers

#include <retrieve_pose_parameter.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

RetrievePoseParameter (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
RetrievePoseParameter (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< RetrievePose > > client_interface)

Private Member Functions Index

tl::expected< std::string, std::string >getServiceName () override

Get the name of the service. More...

tl::expected< RetrievePose::Request, std::string >createRequest () override

Create the service request message. More...

tl::expected< bool, std::string >processResponse (const RetrievePose::Response &response) override

Handles the service response message once the service finishes. 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_future< tl::expected< bool, std::string > >response_future_

Holds the result of calling the service asynchronously. More...

Public Static Functions Index

static BT::PortsListprovidedPorts ()

Required implementation of the static providedPorts function. More...

static BT::KeyValueVectormetadata ()

Description

Retrieves a stamped pose from the MoveIt Pro parameter manager node.

If no parameter is retrieved within the provided "timeout_sec" parameter, this Behavior returns FAILURE. Specifying zero timeout (default) makes this Behavior wait indefinitely to retrieve the parameter.

Data Port NamePort TypeObject Type
timeout_secinputdouble
poseoutputgeometry_msgs::msg::PoseStamped

Definition at line 29 of file retrieve_pose_parameter.hpp.

Public Constructors

RetrievePoseParameter()

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

Declaration at line 32 of file retrieve_pose_parameter.hpp, definition at line 38 of file retrieve_pose_parameter.cpp.

RetrievePoseParameter()

moveit_pro::behaviors::RetrievePoseParameter::RetrievePoseParameter (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources, std::unique_ptr< ClientInterfaceBase< RetrievePose > > client_interface)
explicit

Declaration at line 35 of file retrieve_pose_parameter.hpp, definition at line 44 of file retrieve_pose_parameter.cpp.

Private Member Functions

createRequest()

tl::expected< RetrievePose::Request, std::string > moveit_pro::behaviors::RetrievePoseParameter::createRequest ()
virtual

Create the service request message.

Returns

a RetrievePose request message with the specified timeout.

Declaration at line 59 of file retrieve_pose_parameter.hpp, definition at line 71 of file retrieve_pose_parameter.cpp.

getFuture()

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::RetrievePoseParameter::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 69 of file retrieve_pose_parameter.hpp.

getServiceName()

tl::expected< std::string, std::string > moveit_pro::behaviors::RetrievePoseParameter::getServiceName ()
virtual

Get the name of the service.

For this behavior the service name is always "/retrieve_pose".

Returns

Returns the service name. Since the service name is set to a constant value, this always succeeds.

Declaration at line 53 of file retrieve_pose_parameter.hpp, definition at line 66 of file retrieve_pose_parameter.cpp.

processResponse()

tl::expected< bool, std::string > moveit_pro::behaviors::RetrievePoseParameter::processResponse (const RetrievePose::Response & response)

Handles the service response message once the service finishes.

Returns

Returns an error result if the service finished but did not succeed, since this is treated as an unexpected error state. Otherwise, returns true.

Declaration at line 66 of file retrieve_pose_parameter.hpp, definition at line 85 of file retrieve_pose_parameter.cpp.

Private Member Attributes

response_future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::RetrievePoseParameter::response_future_

Holds the result of calling the service asynchronously.

Definition at line 75 of file retrieve_pose_parameter.hpp.

Public Static Functions

metadata()

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

Declaration at line 45 of file retrieve_pose_parameter.hpp, definition at line 60 of file retrieve_pose_parameter.cpp.

providedPorts()

BT::PortsList moveit_pro::behaviors::RetrievePoseParameter::providedPorts ()
static

Required implementation of the static providedPorts function.

Returns

The list of input and output ports used by this Behavior.

Declaration at line 43 of file retrieve_pose_parameter.hpp, definition at line 51 of file retrieve_pose_parameter.cpp.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.