ros2_control - kilted
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
29namespace controller_manager
30{
31
32using MovingAverageStatistics = ros2_control::MovingAverageStatistics;
34
40{
42 {
43 last_update_cycle_time = std::make_shared<rclcpp::Time>(0, 0, RCL_CLOCK_UNINITIALIZED);
44 execution_time_statistics = std::make_shared<MovingAverageStatistics>();
45 periodicity_statistics = std::make_shared<MovingAverageStatistics>();
46 }
47
49 controller_interface::ControllerInterfaceBaseSharedPtr c;
50 std::shared_ptr<rclcpp::Time> last_update_cycle_time;
51 std::vector<std::string> controllers_chain_group = {};
52 std::shared_ptr<MovingAverageStatistics> execution_time_statistics;
53 std::shared_ptr<MovingAverageStatistics> periodicity_statistics;
54};
55
57{
58 std::vector<std::string> following_controllers;
59 std::vector<std::string> preceding_controllers;
60};
61} // namespace controller_manager
62#endif // CONTROLLER_MANAGER__CONTROLLER_SPEC_HPP_
Definition statistics_types.hpp:49
Definition controller_spec.hpp:57
Controller Specification.
Definition controller_spec.hpp:40
Controller Information.
Definition controller_info.hpp:29