MoveIt Pro Behavior Interface  5.0.1
Library for developing custom behaviors for use in MoveIt Pro
moveit_studio::behaviors::LoadFromYaml< T > Class Template Referencefinal

Loads a type from a YAML file, and returns it in an output port. More...

#include <load_from_yaml.hpp>

Inheritance diagram for moveit_studio::behaviors::LoadFromYaml< T >:
Collaboration diagram for moveit_studio::behaviors::LoadFromYaml< T >:

Public Member Functions

 LoadFromYaml (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
BT::NodeStatus tick () override
 
BT::PortsList providedPorts ()
 
BT::KeyValueVector metadata ()
 
BT::PortsList providedPorts ()
 
BT::KeyValueVector metadata ()
 
- Public Member Functions inherited from moveit_studio::behaviors::SharedResourcesNode< BT::SyncActionNode >
 SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node. More...
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 
static BT::KeyValueVector metadata ()
 

Static Public Attributes

static const char kPortIDInput [] = "file_path"
 
static const char kPortIDOutput [] = "output"
 

Additional Inherited Members

- Protected Attributes inherited from moveit_studio::behaviors::SharedResourcesNode< BT::SyncActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed Description

template<typename T>
class moveit_studio::behaviors::LoadFromYaml< T >

Loads a type from a YAML file, and returns it in an output port.

This is a templated behavior to load any type from a YAML file, as long as a YAML conversion function has been defined for the type (see yaml_parsing_tools.hpp). The YAML file must contain a single instance of the type. To load multiple instances as a vector, use LoadMultipleFromYaml above.

As an example, for a type with 'x' and 'y' fields, this YAML contents should be:

x: 0.1 y: 0.1

Template Parameters
TDetermines the type of object to load from the YAML file.
Data Port Name Port Type Object Type
file_path input std::string
output output T

Constructor & Destructor Documentation

◆ LoadFromYaml()

template<typename T >
moveit_studio::behaviors::LoadFromYaml< T >::LoadFromYaml ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< BehaviorContext > &  shared_resources 
)

Member Function Documentation

◆ metadata() [1/3]

BT::KeyValueVector moveit_studio::behaviors::LoadFromYaml< trajectory_msgs::msg::JointTrajectory >::metadata ( )

◆ metadata() [2/3]

BT::KeyValueVector moveit_studio::behaviors::LoadFromYaml< geometry_msgs::msg::PoseStamped >::metadata ( )

◆ metadata() [3/3]

template<typename T >
BT::KeyValueVector moveit_studio::behaviors::LoadFromYaml< T >::metadata
static

◆ providedPorts() [1/3]

BT::PortsList moveit_studio::behaviors::LoadFromYaml< trajectory_msgs::msg::JointTrajectory >::providedPorts ( )

◆ providedPorts() [2/3]

BT::PortsList moveit_studio::behaviors::LoadFromYaml< geometry_msgs::msg::PoseStamped >::providedPorts ( )

◆ providedPorts() [3/3]

template<typename T >
BT::PortsList moveit_studio::behaviors::LoadFromYaml< T >::providedPorts
static

◆ tick()

template<typename T >
BT::NodeStatus moveit_studio::behaviors::LoadFromYaml< T >::tick
override

Member Data Documentation

◆ kPortIDInput

template<typename T >
const char moveit_studio::behaviors::LoadFromYaml< T >::kPortIDInput = "file_path"
static

◆ kPortIDOutput

template<typename T >
const char moveit_studio::behaviors::LoadFromYaml< T >::kPortIDOutput = "output"
static

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