MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
moveit_studio::test_utils::WithActionBehavior< BehaviorT, ClientInterfaceT > Class Template Reference

#include <test_behavior.hpp>

Inheritance diagram for moveit_studio::test_utils::WithActionBehavior< BehaviorT, ClientInterfaceT >:
Collaboration diagram for moveit_studio::test_utils::WithActionBehavior< BehaviorT, ClientInterfaceT >:

Public Member Functions

void initBehavior (const std::string &name, PortSetterMapGenerator input_port_setter_generator, PortSetterMapGenerator output_port_setter_generator, std::unique_ptr< ClientInterfaceT > &&client_interface)
 Initializes the Behavior under test with a client interface. More...
 
- Public Member Functions inherited from moveit_studio::test_utils::WithBehavior< BehaviorT >
void initBehavior (const std::string &name, PortSetterMapGenerator input_port_setter_generator, PortSetterMapGenerator output_port_setter_generator)
 Initializes the Behavior under test. More...
 
BehaviorT & behavior ()
 
BT::NodeConfiguration & config ()
 
BT::Blackboard & blackboard ()
 
MockLogger & mockLogger ()
 
behaviors::BehaviorContextbehaviorContext ()
 
std::shared_ptr< behaviors::BehaviorContextbehaviorContextSharedPtr ()
 
rclcpp::Node & behaviorNode ()
 
std::shared_ptr< rclcpp::Node > behaviorNodePtr ()
 
void setTestDataDirectories (const std::vector< std::string > &objective_library_directories)
 Configure the directories that a test will read data from and/or write data to. More...
 
void setTransform (const geometry_msgs::msg::TransformStamped &transform_msg)
 Makes a transform available in the shared transform buffer. More...
 
void setTransform (const builtin_interfaces::msg::Time &stamp, std::string_view parent_frame, std::string_view child_frame, const Eigen::Isometry3d &transform)
 Makes a transform available in the shared transform buffer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from moveit_studio::test_utils::WithBehavior< BehaviorT >
void initBehaviorCommon (const std::string &name, PortSetterMapGenerator input_port_setter_generator, PortSetterMapGenerator output_port_setter_generator)
 
std::unique_ptr< BehaviorT > & behaviorPtr ()
 

Member Function Documentation

◆ initBehavior()

template<class BehaviorT , class ClientInterfaceT >
void moveit_studio::test_utils::WithActionBehavior< BehaviorT, ClientInterfaceT >::initBehavior ( const std::string &  name,
PortSetterMapGenerator  input_port_setter_generator,
PortSetterMapGenerator  output_port_setter_generator,
std::unique_ptr< ClientInterfaceT > &&  client_interface 
)

Initializes the Behavior under test with a client interface.

Call this function in your fixture's constructor, SetUp() or any of its setUp* variations.

Parameters
nameThe name of the Behavior.
input_port_setter_generatorA port setter map generator defining the expected input ports.
output_port_setter_generatorA port setter map generator defining the expected output ports.
client_interfaceInterface to an action client.
Exceptions
WrongBehaviorPortsExceptionif the Behavior does not define exactly the expected ports.

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