Skip to main content

SaveCurrentState Class

Use the /get_planning_scene service from move_group to save the robot's current state. More...

Declaration

class moveit_pro::behaviors::SaveCurrentState { ... }

Included Headers

#include <save_current_state.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Private Member Typedefs Index

usingGetPlanningSceneClient = rclcpp::Client< moveit_msgs::srv::GetPlanningScene >

Service client for the /get_planning_scene service. More...

Public Constructors Index

SaveCurrentState (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index

BT::NodeStatusonStart () override

Creates an /get_planning_scene service client and checks for the availability of a corresponding service server. More...

BT::NodeStatusonRunning () override

Sends a request to the /get_planning_scene service, and waits for a response to be received. More...

voidonHalted () override

Private Member Attributes Index

GetPlanningSceneClient::SharedPtrget_planning_scene_client_
std::optional< GetPlanningSceneClient::FutureAndRequestId >request_future_
std::chrono::high_resolution_clock::time_pointend_time_

Public Static Functions Index

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

Description

Use the /get_planning_scene service from move_group to save the robot's current state.

Data Port NamePort TypeObject Type
saved_robot_stateOutputsensor_msgs::msg::JointState

Definition at line 26 of file save_current_state.hpp.

Private Member Typedefs

GetPlanningSceneClient

using moveit_pro::behaviors::SaveCurrentState::GetPlanningSceneClient = rclcpp::Client<moveit_msgs::srv::GetPlanningScene>

Service client for the /get_planning_scene service.

Definition at line 55 of file save_current_state.hpp.

Public Constructors

SaveCurrentState()

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

Declaration at line 29 of file save_current_state.hpp, definition at line 29 of file save_current_state.cpp.

Public Member Functions

onHalted()

void moveit_pro::behaviors::SaveCurrentState::onHalted ()

Declaration at line 49 of file save_current_state.hpp, definition at line 87 of file save_current_state.cpp.

onRunning()

BT::NodeStatus moveit_pro::behaviors::SaveCurrentState::onRunning ()

Sends a request to the /get_planning_scene service, and waits for a response to be received.

method invoked by an action in the RUNNING state.

Returns

Success if the service response is received and the response status is successful. Failure if the service response is not received before the timeout. Failure if the response status is not successful.

Declaration at line 47 of file save_current_state.hpp, definition at line 71 of file save_current_state.cpp.

onStart()

BT::NodeStatus moveit_pro::behaviors::SaveCurrentState::onStart ()

Creates an /get_planning_scene service client and checks for the availability of a corresponding service server.

Returns

Running if the service server exists, Failure if it does not exist.

Declaration at line 40 of file save_current_state.hpp, definition at line 48 of file save_current_state.cpp.

Private Member Attributes

end_time_

std::chrono::high_resolution_clock::time_point moveit_pro::behaviors::SaveCurrentState::end_time_

Definition at line 59 of file save_current_state.hpp.

get_planning_scene_client_

GetPlanningSceneClient::SharedPtr moveit_pro::behaviors::SaveCurrentState::get_planning_scene_client_

Definition at line 56 of file save_current_state.hpp.

request_future_

std::optional<GetPlanningSceneClient::FutureAndRequestId> moveit_pro::behaviors::SaveCurrentState::request_future_

Definition at line 57 of file save_current_state.hpp.

Public Static Functions

metadata()

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

Declaration at line 34 of file save_current_state.hpp, definition at line 42 of file save_current_state.cpp.

providedPorts()

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

Declaration at line 32 of file save_current_state.hpp, definition at line 35 of file save_current_state.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.