UpdatePlanningSceneService Class
Uses the service advertised by the PointCloudServiceOctomapUpdater plugin to apply a point cloud to the planning scene collision octomap and wait until the update has been applied. 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
| UpdatePlanningSceneService (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
|
Construct a new Update Planning Scene object. More... | |
| UpdatePlanningSceneService (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources, std::unique_ptr< ClientInterfaceBase< SendPointCloud2 > > client_interface) | |
|
Alternate constructor which can use an existing ClientInterfaceBase to support testing with a mock service client interface. More... | |
Private Member Functions Index
| tl::expected< std::string, std::string > | getServiceName () override |
|
Gets the name of the service from an input data port. More... | |
| tl::expected< SendPointCloud2::Request, std::string > | createRequest () override |
|
Compose a service request message by getting a point cloud from an input data port and wrapping it in a SendPointCloud2::Request message. More... | |
| tl::expected< bool, std::string > | processResponse (const SendPointCloud2::Response &response) override |
|
Evaluate the service response message to determine if the service succeeded or failed. 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_ |
|
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. More... | |
| static BT::KeyValueVector | metadata () |
Description
Uses the service advertised by the PointCloudServiceOctomapUpdater plugin to apply a point cloud to the planning scene collision octomap and wait until the update has been applied.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| point_cloud | Input | sensor_msgs::msg::PointCloud2 |
| point_cloud_service | Input | std::string |
Definition at line 26 of file update_planning_scene_service.hpp.
Public Constructors
UpdatePlanningSceneService()
| explicit |
Construct a new Update Planning Scene object.
- Parameters
-
name config shared_resources
Declaration at line 35 of file update_planning_scene_service.hpp, definition at line 27 of file update_planning_scene_service.cpp.
UpdatePlanningSceneService()
| explicit |
Alternate constructor which can use an existing ClientInterfaceBase to support testing with a mock service client interface.
- Parameters
-
name config shared_resources client_interface unique_ptr to an instance of a class derived from ClientInterfaceBase. The Behavior will take ownership of the unique_ptr in this constructor.
Declaration at line 47 of file update_planning_scene_service.hpp, definition at line 33 of file update_planning_scene_service.cpp.
Private Member Functions
createRequest()
| virtual |
Compose a service request message by getting a point cloud from an input data port and wrapping it in a SendPointCloud2::Request message.
- Returns
Returns the service request message if successful. If not successful, returns an error message.
Declaration at line 73 of file update_planning_scene_service.hpp, definition at line 70 of file update_planning_scene_service.cpp.
getFuture()
| inline virtual |
Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.
Definition at line 82 of file update_planning_scene_service.hpp.
getServiceName()
| virtual |
Gets the name of the service from an input data port.
- Returns
Returns the name if it could be retrieved from the port. If the name could not be retrieved, return an error message.
Declaration at line 66 of file update_planning_scene_service.hpp, definition at line 56 of file update_planning_scene_service.cpp.
processResponse()
|
Evaluate the service response message to determine if the service succeeded or failed.
- Returns
If the service succeeded, returns true. If the service did not succeed, returns an error message.
Declaration at line 79 of file update_planning_scene_service.hpp, definition at line 81 of file update_planning_scene_service.cpp.
Private Member Attributes
future_
|
Classes derived from AsyncBehaviorBase must have this shared_future as a class member.
Definition at line 88 of file update_planning_scene_service.hpp.
Public Static Functions
metadata()
| static |
Declaration at line 58 of file update_planning_scene_service.hpp, definition at line 50 of file update_planning_scene_service.cpp.
providedPorts()
| static |
Returns list of ports for this behavior.
Inputs to this behavior are: the point cloud, and the name of the service used to update the planning scene.
- Returns
BT::PortsList The list of I/O Ports
Declaration at line 56 of file update_planning_scene_service.hpp, definition at line 41 of file update_planning_scene_service.cpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.