Skip to main content

GetCurrentPlanningScene Class

Get the current planning scene state from the MoveIt PlanningSceneMonitor via service request. More...

Declaration

class moveit_pro::behaviors::GetCurrentPlanningScene { ... }

Included Headers

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

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

Private Member Functions Index

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

User-provided function to get the name of the service when initializing the service client. More...

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

Creates a service request message. More...

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

Sets the planning scene message received in the service response to the output data port. 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 > >future_

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

Public Static Functions Index

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Description

Get the current planning scene state from the MoveIt PlanningSceneMonitor via service request.

Data Port NamePort TypeObject Type
planning_scene_msgoutputmoveit_msgs::msg::PlanningScene

Definition at line 24 of file get_current_planning_scene.hpp.

Public Constructors

GetCurrentPlanningScene()

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

Declaration at line 27 of file get_current_planning_scene.hpp, definition at line 24 of file get_current_planning_scene.cpp.

GetCurrentPlanningScene()

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

Declaration at line 30 of file get_current_planning_scene.hpp, definition at line 31 of file get_current_planning_scene.cpp.

Private Member Functions

createRequest()

tl::expected< GetPlanningScene::Request, std::string > moveit_pro::behaviors::GetCurrentPlanningScene::createRequest ()
virtual

Creates a service request message.

Returns

Returns an instance of GetPlanningScene::Request.

Declaration at line 45 of file get_current_planning_scene.hpp, definition at line 58 of file get_current_planning_scene.cpp.

getFuture()

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

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

Definition at line 55 of file get_current_planning_scene.hpp.

getServiceName()

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

User-provided function to get the name of the service when initializing the service client.

Returns

Returns the name of the service. If not successful, returns an error message. Note that the criteria for success or failure is defined by the user's implementation of this function.

Declaration at line 39 of file get_current_planning_scene.hpp, definition at line 53 of file get_current_planning_scene.cpp.

processResponse()

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

Sets the planning scene message received in the service response to the output data port.

Parameters
response

Response message received from the service server.

Returns

Returns true.

Declaration at line 52 of file get_current_planning_scene.hpp, definition at line 63 of file get_current_planning_scene.cpp.

Private Member Attributes

future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::GetCurrentPlanningScene::future_

Holds the result of calling the service asynchronously.

Definition at line 63 of file get_current_planning_scene.hpp.

Public Static Functions

metadata()

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

Declaration at line 36 of file get_current_planning_scene.hpp, definition at line 47 of file get_current_planning_scene.cpp.

providedPorts()

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

Declaration at line 34 of file get_current_planning_scene.hpp, definition at line 39 of file get_current_planning_scene.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.