◆ export_state_interfaces()
Exports all state interfaces for this hardware interface.
The state interfaces have to be created and transferred according to the hardware info passed in for the configuration.
Note the ownership over the state interfaces is transferred to the caller.
- Returns
- vector of state interfaces
Implements hardware_interface::SensorInterface.
◆ get_clock()
rclcpp::Clock::SharedPtr ros2_control_demo_example_14::RRBotSensorPositionFeedback::get_clock |
( |
| ) |
const |
|
inline |
Get the clock of the SensorInterface.
- Returns
- clock of the SensorInterface.
◆ get_logger()
rclcpp::Logger ros2_control_demo_example_14::RRBotSensorPositionFeedback::get_logger |
( |
| ) |
const |
|
inline |
Get the logger of the SensorInterface.
- Returns
- logger of the SensorInterface.
◆ on_init()
Initialization of the hardware interface from data parsed from the robot's URDF.
- Parameters
-
[in] | hardware_info | structure with data from URDF. |
- Returns
- CallbackReturn::SUCCESS if required data are provided and can be parsed.
-
CallbackReturn::ERROR if any error happens or data are missing.
Reimplemented from hardware_interface::SensorInterface.
◆ read()
hardware_interface::return_type ros2_control_demo_example_14::RRBotSensorPositionFeedback::read |
( |
const rclcpp::Time & |
time, |
|
|
const rclcpp::Duration & |
period |
|
) |
| |
|
overridevirtual |
Read the current state values from the actuator.
The data readings from the physical hardware has to be updated and reflected accordingly in the exported state interfaces. That is, the data pointed by the interfaces shall be updated.
- Parameters
-
[in] | time | The time at the start of this control loop iteration |
[in] | period | The measured time taken by the last control loop iteration |
- Returns
- return_type::OK if the read was successful, return_type::ERROR otherwise.
Implements hardware_interface::SensorInterface.
The documentation for this class was generated from the following files:
- ros2_control_demos/example_14/hardware/include/ros2_control_demo_example_14/rrbot_sensor_for_position_feedback.hpp
- ros2_control_demos/example_14/hardware/rrbot_sensor_for_position_feedback.cpp