MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
moveit_studio::behaviors::LoadMultipleFromYaml< T > Class Template Referencefinal

Loads types from a YAML file, and returns them as a vector in an output port. More...

#include <load_from_yaml.hpp>

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

Public Member Functions

 LoadMultipleFromYaml (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 ()
 
BT::PortsList providedPorts ()
 
BT::KeyValueVector metadata ()
 
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::LoadMultipleFromYaml< T >

Loads types from a YAML file, and returns them as a vector 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 can contain one or multiple instances of the type. In any case, an std::vector<T> will be returned, even if the file contains a single element.

In case of multiple messages, the YAML file is expected to be formatted as a multi-document YAML, e.g. for a type with 'x' and 'y' fields, this YAML contents would return an std::vector with two elements:


x: 0.1

y: 0.1

x: 0.2 y: 0.2

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 std::vector<T>

Constructor & Destructor Documentation

◆ LoadMultipleFromYaml()

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

Member Function Documentation

◆ metadata() [1/6]

BT::KeyValueVector moveit_studio::behaviors::LoadMultipleFromYaml< std_msgs::msg::Header >::metadata ( )

◆ metadata() [2/6]

BT::KeyValueVector moveit_studio::behaviors::LoadMultipleFromYaml< geometry_msgs::msg::Pose >::metadata ( )

◆ metadata() [3/6]

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

◆ metadata() [4/6]

BT::KeyValueVector moveit_studio::behaviors::LoadMultipleFromYaml< geometry_msgs::msg::PointStamped >::metadata ( )

◆ metadata() [5/6]

BT::KeyValueVector moveit_studio::behaviors::LoadMultipleFromYaml< moveit_studio_vision_msgs::msg::ObjectSubframe >::metadata ( )

◆ metadata() [6/6]

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

◆ providedPorts() [1/6]

BT::PortsList moveit_studio::behaviors::LoadMultipleFromYaml< std_msgs::msg::Header >::providedPorts ( )

◆ providedPorts() [2/6]

BT::PortsList moveit_studio::behaviors::LoadMultipleFromYaml< geometry_msgs::msg::Pose >::providedPorts ( )

◆ providedPorts() [3/6]

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

◆ providedPorts() [4/6]

BT::PortsList moveit_studio::behaviors::LoadMultipleFromYaml< geometry_msgs::msg::PointStamped >::providedPorts ( )

◆ providedPorts() [5/6]

BT::PortsList moveit_studio::behaviors::LoadMultipleFromYaml< moveit_studio_vision_msgs::msg::ObjectSubframe >::providedPorts ( )

◆ providedPorts() [6/6]

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

◆ tick()

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

Member Data Documentation

◆ kPortIDInput

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

◆ kPortIDOutput

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

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