22#include <hardware_interface/hardware_info.hpp>
30inline std::optional<hardware_interface::ComponentInfo>
33 for (
size_t sensor_index = 0; sensor_index < hardware_info.
sensors.size(); sensor_index++)
35 const auto& sensor = hardware_info.
sensors.at(sensor_index);
36 if (hardware_info.
sensors.at(sensor_index).name == name)
std::optional< hardware_interface::ComponentInfo > get_sensor_from_info(const hardware_interface::HardwareInfo &hardware_info, const std::string &name)
Returns the sensor's component info for the provided sensor name, if it exists.
Definition utils.hpp:31
This structure stores information about hardware defined in a robot's URDF.
Definition hardware_info.hpp:106
std::vector< ComponentInfo > sensors
Definition hardware_info.hpp:124