MoveIt Pro Behavior Interface
5.2.0
Library for developing custom behaviors for use in MoveIt Pro
|
#include <gmock/gmock.h>
#include <behaviortree_cpp/tree_node.h>
#include <behaviortree_cpp/blackboard.h>
#include <moveit_studio_behavior_interface/behavior_context.hpp>
#include <moveit_studio_common/test_utils/mock_logger.hpp>
#include <tf2_eigen/tf2_eigen.hpp>
#include <moveit_studio_behavior_interface/action_client_behavior_base.hpp>
#include <moveit_studio_behavior_interface/impl/test_behavior_impl.hpp>
Classes | |
class | moveit_studio::test_utils::WithBehaviorWithoutContext< BehaviorT > |
Adds testing capabilities of Behaviors without context to any test fixture. More... | |
class | moveit_studio::test_utils::WithBehavior< BehaviorT > |
Adds testing capabilities of Behaviors with context to any test fixture. More... | |
class | moveit_studio::test_utils::WithActionBehavior< BehaviorT, ClientInterfaceT > |
class | moveit_studio::test_utils::WrongBehaviorPortsException |
Exception thrown by Behavior testing classes when the Behavior does not define exactly the expected ports. More... | |
Namespaces | |
moveit_studio | |
moveit_studio::test_utils | |
Macros | |
#define | BEGIN_BEHAVIOR_PORT_SETTER_MAP_WITH_ATTRIBUTES(name, attributes) |
Begins the definition of a port setter map and adds attributes to its generator function. More... | |
#define | BEGIN_BEHAVIOR_PORT_SETTER_MAP(name) BEGIN_BEHAVIOR_PORT_SETTER_MAP_WITH_ATTRIBUTES(name, ) |
Begins the definition of a port setter map. More... | |
#define | DEFINE_BEHAVIOR_PORT_SETTER(port_id, default_object) |
Defines the port setter for a port ID. More... | |
#define | DEFINE_OPTIONAL_BEHAVIOR_PORT_SETTER(port_id, default_object) { port_id, ::moveit_studio::test_utils::PortSetter() }, |
Defines the port setter for an optional port ID. More... | |
#define | END_BEHAVIOR_PORT_SETTER_MAP() |
Ends the definition of a port setter map. More... | |
Typedefs | |
using | moveit_studio::test_utils::PortSetter = std::function< void(BT::Blackboard &, const std::string &)> |
A callable that sets a Behavior port in a blackboard. More... | |
using | moveit_studio::test_utils::PortSetterMap = std::map< std::string, PortSetter > |
A map associating port names to their setters. More... | |
using | moveit_studio::test_utils::PortSetterMapGenerator = const PortSetterMap &(*)(void) |
A function generating a map of port setters. More... | |
Functions | |
std::set< std::string > | moveit_studio::test_utils::getPortIDs (const PortSetterMap &map, bool only_mandatory=false) |
Returns port IDs in a port setter map. More... | |
#define BEGIN_BEHAVIOR_PORT_SETTER_MAP | ( | name | ) | BEGIN_BEHAVIOR_PORT_SETTER_MAP_WITH_ATTRIBUTES(name, ) |
Begins the definition of a port setter map.
Must be followed by a instance of END_BEHAVIOR_PORT_SETTER_MAP; there can be instances of DEFINE_BEHAVIOR_PORT_SETTER between the two.
name | Name of this port setter map. Must be unique within the file. |
#define BEGIN_BEHAVIOR_PORT_SETTER_MAP_WITH_ATTRIBUTES | ( | name, | |
attributes | |||
) |
Begins the definition of a port setter map and adds attributes to its generator function.
Unless you have a very specific need to add attributes to the function this macro generates, you probably want to use BEGIN_BEHAVIOR_PORT_SETTER_MAP instead. Must be followed by an instance of END_BEHAVIOR_PORT_SETTER_MAP; there can be instances of DEFINE_BEHAVIOR_PORT_SETTER between the two.
name | Name of this port setter map. Must be unique within the file. |
attributes | Attributes to prefix the generator function with. |
#define DEFINE_BEHAVIOR_PORT_SETTER | ( | port_id, | |
default_object | |||
) |
Defines the port setter for a port ID.
port_id | ID of the Behavior port to set. |
default_object | Value the port will be set to. |
#define DEFINE_OPTIONAL_BEHAVIOR_PORT_SETTER | ( | port_id, | |
default_object | |||
) | { port_id, ::moveit_studio::test_utils::PortSetter() }, |
Defines the port setter for an optional port ID.
Optional ports are those that can have no value set when the behavior is run, although the behavior still has to create them.
port_id | ID of the Behavior port to set. |
default_object | Value the port will be set to. |
#define END_BEHAVIOR_PORT_SETTER_MAP | ( | ) |
Ends the definition of a port setter map.
Must be preceded by a instance of BEGIN_BEHAVIOR_PORT_SETTER_MAP*; there can be instances of DEFINE_BEHAVIOR_PORT_SETTER between the two.