ros2_control - foxy
Loading...
Searching...
No Matches
hardware_info.hpp
1// Copyright 2020 ros2_control Development Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef HARDWARE_INTERFACE__HARDWARE_INFO_HPP_
16#define HARDWARE_INTERFACE__HARDWARE_INFO_HPP_
17
18#include <string>
19#include <unordered_map>
20#include <vector>
21
22namespace hardware_interface
23{
29{
34 std::string name;
36 std::string min;
38 std::string max;
40 std::string initial_value;
42 std::string data_type;
44 int size;
45};
46
52{
54 std::string name;
56 std::string type;
61 std::vector<InterfaceInfo> command_interfaces;
66 std::vector<InterfaceInfo> state_interfaces;
68 std::unordered_map<std::string, std::string> parameters;
69};
70
73{
74 std::string name;
75 std::vector<std::string> interfaces;
76 std::string role;
77 double mechanical_reduction = 1.0;
78 double offset = 0.0;
79};
80
83{
84 std::string name;
85 std::vector<std::string> interfaces;
86 std::string role;
87 double offset = 0.0;
88};
89
92{
93 std::string name;
94 std::string type;
95 std::vector<JointInfo> joints;
96 std::vector<ActuatorInfo> actuators;
98 std::unordered_map<std::string, std::string> parameters;
99};
100
103{
105 std::string name;
107 std::string type;
111 std::unordered_map<std::string, std::string> hardware_parameters;
116 std::vector<ComponentInfo> joints;
121 std::vector<ComponentInfo> sensors;
126 std::vector<ComponentInfo> gpios;
131 std::vector<TransmissionInfo> transmissions;
132};
133
134} // namespace hardware_interface
135#endif // HARDWARE_INTERFACE__HARDWARE_INFO_HPP_
Contains semantic info about a given actuator loaded from XML (URDF)
Definition hardware_info.hpp:83
Definition hardware_info.hpp:52
std::vector< InterfaceInfo > command_interfaces
Definition hardware_info.hpp:61
std::unordered_map< std::string, std::string > parameters
(Optional) Key-value pairs of component parameters, e.g. min/max values or serial number.
Definition hardware_info.hpp:68
std::vector< InterfaceInfo > state_interfaces
Definition hardware_info.hpp:66
std::string name
Name of the component.
Definition hardware_info.hpp:54
std::string type
Type of the component: sensor, joint, or GPIO.
Definition hardware_info.hpp:56
This structure stores information about hardware defined in a robot's URDF.
Definition hardware_info.hpp:103
std::string type
Type of the hardware: actuator, sensor or system.
Definition hardware_info.hpp:107
std::unordered_map< std::string, std::string > hardware_parameters
(Optional) Key-value pairs for hardware parameters.
Definition hardware_info.hpp:111
std::string hardware_class_type
Class of the hardware that will be dynamically loaded.
Definition hardware_info.hpp:109
std::vector< ComponentInfo > gpios
Definition hardware_info.hpp:126
std::vector< ComponentInfo > joints
Definition hardware_info.hpp:116
std::string name
Name of the hardware.
Definition hardware_info.hpp:105
std::vector< ComponentInfo > sensors
Definition hardware_info.hpp:121
std::vector< TransmissionInfo > transmissions
Definition hardware_info.hpp:131
Definition hardware_info.hpp:29
std::string max
(Optional) Maximal allowed values of the interface.
Definition hardware_info.hpp:38
std::string initial_value
(Optional) Initial value of the interface.
Definition hardware_info.hpp:40
std::string name
Definition hardware_info.hpp:34
int size
(Optional) If the handle is an array, the size of the array. Used by GPIOs.
Definition hardware_info.hpp:44
std::string min
(Optional) Minimal allowed values of the interface.
Definition hardware_info.hpp:36
std::string data_type
(Optional) The datatype of the interface, e.g. "bool", "int". Used by GPIOs.
Definition hardware_info.hpp:42
Contains semantic info about a given joint loaded from XML (URDF)
Definition hardware_info.hpp:73
Contains semantic info about a given transmission loaded from XML (URDF)
Definition hardware_info.hpp:92
std::unordered_map< std::string, std::string > parameters
(Optional) Key-value pairs of custom parameters
Definition hardware_info.hpp:98