|
| | ControllerInterface (bool claim_all_state_interfaces=false) |
| | Default constructor.
|
| |
| CallbackReturn | on_init () override |
| | Declare parameters.
|
| |
| CallbackReturn | on_configure (const rclcpp_lifecycle::State &previous_state) final |
| | Set class properties from parameters.
|
| |
| CallbackReturn | on_activate (const rclcpp_lifecycle::State &previous_state) final |
| | Initialize internal data attributes from configured interfaces and wait for valid states from hardware.
|
| |
| CallbackReturn | on_deactivate (const rclcpp_lifecycle::State &previous_state) final |
| | Deactivate the controller.
|
| |
| controller_interface::return_type | update (const rclcpp::Time &time, const rclcpp::Duration &period) final |
| | Read the state interfaces, perform control evaluation and write the command interfaces.
|
| |
| controller_interface::InterfaceConfiguration | state_interface_configuration () const final |
| | Configure the state interfaces.
|
| |
| controller_interface::InterfaceConfiguration | command_interface_configuration () const final |
| | Configure the command interfaces.
|
| |
| | BaseControllerInterface () |
| | Default constructor.
|
| |
| CallbackReturn | on_init () override |
| | Declare parameters and register the on_set_parameters callback.
|
| |
| CallbackReturn | on_configure (const rclcpp_lifecycle::State &previous_state) override |
| | Add signals.
|
| |
| template<> |
| void | write_output (const std::string &name, const bool &data) |
| |
| template<> |
| void | write_output (const std::string &name, const double &data) |
| |
| template<> |
| void | write_output (const std::string &name, const std::vector< double > &data) |
| |
| template<> |
| void | write_output (const std::string &name, const int &data) |
| |
| template<> |
| void | write_output (const std::string &name, const std::string &data) |
| |
|
| virtual CallbackReturn | add_interfaces () |
| | Add interfaces like parameters, signals, services, and predicates to the controller.
|
| |
| virtual CallbackReturn | on_configure () |
| | Configure the controller.
|
| |
| virtual CallbackReturn | on_activate () |
| | Activate the controller.
|
| |
| virtual CallbackReturn | on_deactivate () |
| | Deactivate the controller.
|
| |
| virtual controller_interface::return_type | read_state_interfaces () |
| | Read the state interfaces.
|
| |
| virtual controller_interface::return_type | write_command_interfaces (const rclcpp::Duration &period) |
| | Write the command interfaces.
|
| |
| virtual controller_interface::return_type | evaluate (const rclcpp::Time &time, const std::chrono::nanoseconds &period)=0 |
| | The control logic callback.
|
| |
| void | add_state_interface (const std::string &name, const std::string &interface) |
| | Add a state interface to the controller by name.
|
| |
| void | add_command_interface (const std::string &name, const std::string &interface) |
| | Add a command interface to the controller by name.
|
| |
| std::unordered_map< std::string, double > | get_state_interfaces (const std::string &name) const |
| | Get a map containing the state interfaces by name of the parent tag.
|
| |
| double | get_state_interface (const std::string &name, const std::string &interface) const |
| | Get the value of a state interface by name.
|
| |
| double | get_command_interface (const std::string &name, const std::string &interface) const |
| | Get the value of a command interface by name.
|
| |
| void | set_command_interface (const std::string &name, const std::string &interface, double value) |
| | Set the value of a command interface by name.
|
| |
| void | add_parameter (const std::shared_ptr< state_representation::ParameterInterface > ¶meter, const std::string &description, bool read_only=false) |
| | Add a parameter.
|
| |
| template<typename T > |
| void | add_parameter (const std::string &name, const T &value, const std::string &description, bool read_only=false) |
| | Add a parameter.
|
| |
| virtual bool | on_validate_parameter_callback (const std::shared_ptr< state_representation::ParameterInterface > ¶meter) |
| | Parameter validation function to be redefined by derived controller classes.
|
| |
| std::shared_ptr< state_representation::ParameterInterface > | get_parameter (const std::string &name) const |
| | Get a parameter by name.
|
| |
| template<typename T > |
| T | get_parameter_value (const std::string &name) const |
| | Get a parameter value by name.
|
| |
| template<typename T > |
| void | set_parameter_value (const std::string &name, const T &value) |
| | Set the value of a parameter.
|
| |
| void | add_predicate (const std::string &predicate_name, bool predicate_value) |
| | Add a predicate to the map of predicates.
|
| |
| void | add_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function) |
| | Add a predicate to the map of predicates based on a function to periodically call.
|
| |
| bool | get_predicate (const std::string &predicate_name) const |
| | Get the logical value of a predicate.
|
| |
| void | set_predicate (const std::string &predicate_name, bool predicate_value) |
| | Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
|
| |
| void | set_predicate (const std::string &predicate_name, const std::function< bool(void)> &predicate_function) |
| | Set the value of the predicate given as parameter, if the predicate is not found does not do anything.
|
| |
| void | add_trigger (const std::string &trigger_name) |
| | Add a trigger to the controller.
|
| |
| void | trigger (const std::string &trigger_name) |
| | Latch the trigger with the provided name.
|
| |
| template<typename T > |
| void | add_input (const std::string &name, const std::string &topic_name="") |
| | Add an input to the controller.
|
| |
| template<typename T > |
| void | add_output (const std::string &name, const std::string &topic_name="") |
| | Add an output to the controller.
|
| |
| void | set_input_validity_period (double input_validity_period) |
| | Set the input validity period of input signals.
|
| |
| template<typename T > |
| std::optional< T > | read_input (const std::string &name) |
| | Read the most recent message of an input.
|
| |
| template<typename T > |
| void | write_output (const std::string &name, const T &data) |
| | Write an object to an output.
|
| |
| void | add_service (const std::string &service_name, const std::function< ControllerServiceResponse(void)> &callback) |
| | Add a service to trigger a callback function with no input arguments.
|
| |
| void | add_service (const std::string &service_name, const std::function< ControllerServiceResponse(const std::string &string)> &callback) |
| | Add a service to trigger a callback function with a string payload.
|
| |
| rclcpp::QoS | get_qos () const |
| | Getter of the Quality of Service attribute.
|
| |
| void | set_qos (const rclcpp::QoS &qos) |
| | Set the Quality of Service for ROS publishers and subscribers.
|
| |
| bool | is_active () const |
| | Check if the controller is currently in state active or not.
|
| |
| std::timed_mutex & | get_command_mutex () |
| | Get the reference to the command mutex.
|
| |
| template<> |
| void | add_input (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| void | add_input (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| void | add_input (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| void | add_output (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| void | add_output (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| void | add_output (const std::string &name, const std::string &topic_name) |
| |
| template<> |
| std::optional< bool > | read_input (const std::string &name) |
| |
| template<> |
| std::optional< double > | read_input (const std::string &name) |
| |
| template<> |
| std::optional< int > | read_input (const std::string &name) |
| |