ros2_control hardware interface
For applications with strong real-time and safety requirements
The hardware interface variant is designed for applications within the ros2_control framework that require strong real-time and safety requirements. This variant always uses the reading from the buffer mechanism, timed by the ros2_control master clock.
Learn more: ros2_control official documentation
Available State Interfaces
Once the hardare interface is loaded by the controller_manager the following state interfaces are available:
Interface Name |
Type |
Description |
|---|---|---|
|
Status |
Indicates if the hardware interface is active |
|
Status |
Sensor throttling status flag |
|
Status |
Sensor overrange status flag |
|
Status |
Sensor invalid data status flag |
|
Status |
Raw data status flag |
|
Status |
Indicates if any of the status flags are set, acting as a general summary status flag |
|
Measurement |
Force measurements in X, Y, Z axes |
|
Measurement |
Torque measurements in X, Y, Z axes |
|
Measurement |
Acceleration measurements in X, Y, Z axes |
|
Measurement |
Angular rate measurements in X, Y, Z axes |
|
Measurement |
Temperature reading in Celsius |
|
Timing |
Sensor timestamp in microseconds |
Taring procedure
Important
The sensor is always zeroed during activation of the hardware interface if the parameter tare_on_activation is set to true in the URDF configuration.
To perform a taring procedure, the hardware interface needs to be deactivated and then re-activated.
It is important to ensure that no controller is actively using the sensor data during this process,
as the state interface data will not be updated while the hardware inteface is deactivated.
The hardware_interface_active will turn false during this period, indicating that the sensor data is not being updated.
An example how to do this is shown in the example repository linked below.
Safety Guidelines
A proper use of the Bota FT sensor hardware interface requires monitoring two distinct safety aspects:
Hardware Interface Status
Due to ros2_control implementation, sensor interfaces can be exposed even when hardware is disconnected. Always check
hardware_interface_activebefore using any sensor data. If this flag turnsfalse, the state interfaces are not being updated with sensor data, and you must not use them in your control logic.
Sensor Status Flags
The sensor provides status flags that indicate data quality and operational conditions. Always monitor these flags in your control logic and react accordingly to ensure safe operation.
Getting Started
Bota Systems provides an example including a full ros2_control setup with a Bota FT sensor. It demonstrates how to integrate the sensor into a ROS2 control system, including the necessary configuration and usage patterns.
Found the packages implementation in our official GitLab repository.
bota_example_ros2_control
on GitLab