You're reading the documentation for an older, but still supported, version of ROS 2. For information on the latest version, please have a look at Iron.

Hardware Components

Hardware components represent abstraction of physical hardware in ros2_control framework. There are three types of hardware Actuator, Sensor and System. For details on each type check Hardware Components description.

Guidelines and Best Practices

Handling of errors that happen during read() and write() calls

If hardware_interface::return_type::ERROR is returned from read() or write() methods of a hardware_interface class, on_error(previous_state) method will be called to handle any error that happened.

Error handling follows the node lifecycle. If successful CallbackReturn::SUCCESS is returned and hardware is again in UNCONFIGURED state, if any ERROR or FAILURE happens the hardware ends in FINALIZED state and can not be recovered. The only option is to reload the complete plugin, but there is currently no service for this in the Controller Manager.