ros2_control - rolling
Loading...
Searching...
No Matches
controller_spec.hpp
1// Copyright 2020 Open Source Robotics Foundation, Inc.
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: Wim Meeussen
17 */
18
19#ifndef CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_
20#define CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_
21
22#include <memory>
23#include <string>
24#include <vector>
25#include "controller_interface/controller_interface_base.hpp"
26#include "hardware_interface/controller_info.hpp"
27#include "hardware_interface/types/statistics_types.hpp"
28#include "rclcpp/time.hpp"
29
30namespace controller_manager
31{
32
33using MovingAverageStatistics = ros2_control::MovingAverageStatistics;
35
40struct ControllerSpec
41{
42 ControllerSpec()
43 {
44 last_update_cycle_time = std::make_shared<rclcpp::Time>(0, 0, RCL_CLOCK_UNINITIALIZED);
45 execution_time_statistics = std::make_shared<MovingAverageStatistics>();
46 periodicity_statistics = std::make_shared<MovingAverageStatistics>();
47 }
48
50 controller_interface::ControllerInterfaceBaseSharedPtr c;
51 std::shared_ptr<rclcpp::Time> last_update_cycle_time;
52 std::vector<std::string> controllers_chain_group = {};
53 std::shared_ptr<MovingAverageStatistics> execution_time_statistics;
54 std::shared_ptr<MovingAverageStatistics> periodicity_statistics;
55};
56
58{
59 std::vector<std::string> following_controllers;
60 std::vector<std::string> preceding_controllers;
61};
62} // namespace controller_manager
63#endif // CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_
Definition controller_spec.hpp:58
Controller Information.
Definition controller_info.hpp:28