Class FrankaSemanticComponentInterface
Defined in File franka_semantic_component_interface.hpp
Inheritance Relationships
Derived Types
public franka_semantic_components::FrankaCartesianPoseInterface
(Class FrankaCartesianPoseInterface)public franka_semantic_components::FrankaCartesianVelocityInterface
(Class FrankaCartesianVelocityInterface)
Class Documentation
-
class FrankaSemanticComponentInterface
Subclassed by franka_semantic_components::FrankaCartesianPoseInterface, franka_semantic_components::FrankaCartesianVelocityInterface
Public Functions
-
explicit FrankaSemanticComponentInterface(const std::string &name, size_t state_interface_size = 0, size_t command_interface_size = 0)
- Parameters:
name – [in] of the semantic component interface. Used to prefix the state and command interfaces if not assigned
state_interface_size – [in] size of the loaned state interfaces. If not given defaulted to 0.
command_interface_size – [in] size of the loaned command interfaces. If not given defaulted to 0.
-
FrankaSemanticComponentInterface(const FrankaSemanticComponentInterface&) = delete
-
FrankaSemanticComponentInterface &operator=(FrankaSemanticComponentInterface const&) = delete
-
FrankaSemanticComponentInterface(FrankaSemanticComponentInterface&&) = default
-
FrankaSemanticComponentInterface &operator=(FrankaSemanticComponentInterface&&) = default
-
virtual ~FrankaSemanticComponentInterface() = default
-
bool assign_loaned_state_interfaces(std::vector<hardware_interface::LoanedStateInterface> &state_interfaces)
Assign loaned state interfaces from the hardware.Assign loaned state interfaces on the controller start.
- Parameters:
state_interfaces – [in] vector of interfaces provided by the controller.
- Returns:
true when success, else false
-
bool assign_loaned_command_interfaces(std::vector<hardware_interface::LoanedCommandInterface> &command_interfaces)
Assign loaned command interfaces from the hardware. Assign loaned command interfaces on the controller start.
- Parameters:
command_interfaces – [in] vector of interfaces provided by the controller.
- Returns:
true when success, else false
-
void release_interfaces()
Release loaned interfaces from the hardware.
-
virtual std::vector<std::string> get_state_interface_names()
The function should be used in “state_interface_configuration()” of a controller to provide standardized interface names for the semantic component.
\default Default implementation defined state interfaces as “name/NR” where NR is number from 0 to size of values;
- Returns:
list of strings with state interface names for the semantic component.
-
virtual std::vector<std::string> get_command_interface_names()
Definition of command interface names for the component.
The function should be used in “command_interface_configuration()” of a controller to provide standardized interface names semantic component.
\default Default implementation defined command interfaces as “name/NR” where NR is number from 0 to size of values;
- Returns:
list of strings with command interface names for the semantic component.
-
std::vector<double> get_values_state_interfaces() const
Return all values of the state interfaces.
- Returns:
std::vector<double> state_interface_values
-
std::vector<double> get_values_command_interfaces() const
Return all values for the command interfaces
- Returns:
std::vector<double> command_interface_values
-
bool set_values(const std::vector<double> &commanded_values)
Set all values for the command interfaces
- Parameters:
std::vector<double> – [in] commanded values to be set
- Returns:
true if commanded_values size matches the loaned command_interface size, else false
Protected Attributes
-
std::string name_
-
std::vector<std::string> state_interface_names_
-
std::vector<std::string> command_interface_names_
-
std::vector<std::reference_wrapper<hardware_interface::LoanedStateInterface>> state_interfaces_
-
std::vector<std::reference_wrapper<hardware_interface::LoanedCommandInterface>> command_interfaces_
-
explicit FrankaSemanticComponentInterface(const std::string &name, size_t state_interface_size = 0, size_t command_interface_size = 0)