ros2_control - foxy
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
controller_interface Namespace Reference

Classes

class  ControllerInterface
 
struct  InterfaceConfiguration
 Configuring what command/state interfaces to claim. More...
 

Typedefs

using ControllerInterfaceSharedPtr = std::shared_ptr< ControllerInterface >
 

Enumerations

enum class  return_type : std::uint8_t { OK = 0 , ERROR = 1 , SUCCESS = OK }
 
enum class  interface_configuration_type : std::uint8_t { ALL = 0 , INDIVIDUAL = 1 , NONE = 2 }
 Indicating which interfaces are to be claimed. More...
 

Functions

template<typename T >
bool get_ordered_interfaces (std::vector< T > &unordered_interfaces, const std::vector< std::string > &ordered_names, const std::string &interface_type, std::vector< std::reference_wrapper< T > > &ordered_interfaces)
 Reorder interfaces with references according to joint names or full interface names.
 
bool interface_list_contains_interface_type (const std::vector< std::string > &interface_type_list, const std::string &interface_type)
 

Detailed Description

Author
: Denis Stogl

Enumeration Type Documentation

◆ interface_configuration_type

enum class controller_interface::interface_configuration_type : std::uint8_t
strong

Indicating which interfaces are to be claimed.

One might either claim all available command/state interfaces, specifying a set of individual interfaces, or none at all.

Function Documentation

◆ get_ordered_interfaces()

template<typename T >
bool controller_interface::get_ordered_interfaces ( std::vector< T > &  unordered_interfaces,
const std::vector< std::string > &  ordered_names,
const std::string &  interface_type,
std::vector< std::reference_wrapper< T > > &  ordered_interfaces 
)

Reorder interfaces with references according to joint names or full interface names.

Method to reorder and check if all expected interfaces are provided for the joint.

Parameters
[in]unordered_interfacesvector with loaned unordered state or command interfaces.
[in]ordered_namesvector with ordered names to order unordered_interfaces. The valued inputs are list of joint names or interface full names. If joint names are used for ordering, interface_type specifies valid interface. If full interface names are used for ordering, interface_type should be empty string ("").
[in]interface_typeused for ordering interfaces with respect to joint names.
[out]ordered_interfacesvector with ordered interfaces.
Returns
true if all interfaces or joints in ordered_names are found, otherwise false.