ros2_control - rolling
Loading...
Searching...
No Matches
hardware_component_info.hpp
1// Copyright (c) 2021, Stogl Robotics Consulting UG (haftungsbeschränkt)
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//
16// Author: Denis Stogl
17//
18
19#ifndef HARDWARE_INTERFACE__HARDWARE_COMPONENT_INFO_HPP_
20#define HARDWARE_INTERFACE__HARDWARE_COMPONENT_INFO_HPP_
21
22#include <memory>
23#include <string>
24#include <vector>
25
26#include "rclcpp/time.hpp"
27#include "rclcpp_lifecycle/state.hpp"
28
29#include "hardware_interface/types/statistics_types.hpp"
30namespace hardware_interface
31{
33{
38 std::shared_ptr<ros2_control::TimeWindowStatistics> recent_periodicity = nullptr;
40 std::shared_ptr<ros2_control::TimeWindowStatistics> recent_execution_time = nullptr;
41};
42
43
47{
49 std::string name;
50
52 std::string type;
53
55 std::string group;
56
58 std::string plugin_name;
59
62
64 unsigned int rw_rate;
65
67 rclcpp_lifecycle::State state;
68
70 std::vector<std::string> state_interfaces;
71
73 std::vector<std::string> command_interfaces;
74
76 std::shared_ptr<HardwareComponentStatisticsData> read_statistics = nullptr;
77
79 std::shared_ptr<HardwareComponentStatisticsData> write_statistics = nullptr;
80};
81
82} // namespace hardware_interface
83#endif // HARDWARE_INTERFACE__HARDWARE_COMPONENT_INFO_HPP_
Data structure to store the statistics of a moving average. The data is protected by a mutex and the ...
Definition statistics_types.hpp:505
Definition mujoco_system_interface.hpp:57
Hardware Component Information.
Definition hardware_component_info.hpp:47
bool is_async
Component is async.
Definition hardware_component_info.hpp:61
std::string group
Component group.
Definition hardware_component_info.hpp:55
std::vector< std::string > command_interfaces
List of provided command interfaces by the component.
Definition hardware_component_info.hpp:73
std::string plugin_name
Component pluginlib plugin name.
Definition hardware_component_info.hpp:58
std::shared_ptr< HardwareComponentStatisticsData > write_statistics
Write cycle statistics of the component.
Definition hardware_component_info.hpp:79
std::string type
Component "classification": "actuator", "sensor" or "system".
Definition hardware_component_info.hpp:52
std::string name
Component name.
Definition hardware_component_info.hpp:49
std::shared_ptr< HardwareComponentStatisticsData > read_statistics
Read cycle statistics of the component.
Definition hardware_component_info.hpp:76
std::vector< std::string > state_interfaces
List of provided state interfaces by the component.
Definition hardware_component_info.hpp:70
rclcpp_lifecycle::State state
Component current state.
Definition hardware_component_info.hpp:67
Definition hardware_component_info.hpp:33
std::shared_ptr< ros2_control::TimeWindowStatistics > recent_periodicity
Definition hardware_component_info.hpp:38
std::shared_ptr< ros2_control::TimeWindowStatistics > recent_execution_time
Execution time (in us) over the recent window, shared like recent_periodicity.
Definition hardware_component_info.hpp:40