ros2_control - humble
Loading...
Searching...
No Matches
bicycle_steering_controller.hpp
1// Copyright (c) 2023, 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// Authors: dr. sc. Tomislav Petkovic, Dr. Ing. Denis Štogl
16//
17
18#ifndef BICYCLE_STEERING_CONTROLLER__BICYCLE_STEERING_CONTROLLER_HPP_
19#define BICYCLE_STEERING_CONTROLLER__BICYCLE_STEERING_CONTROLLER_HPP_
20
21#include <memory>
22
23#include "bicycle_steering_controller/visibility_control.h"
24#include "bicycle_steering_controller_parameters.hpp"
25#include "steering_controllers_library/steering_controllers_library.hpp"
26
27namespace bicycle_steering_controller
28{
29// name constants for state interfaces
30static constexpr size_t STATE_TRACTION_WHEEL = 0;
31static constexpr size_t STATE_STEER_AXIS = 1;
32
33// name constants for command interfaces
34static constexpr size_t CMD_TRACTION_WHEEL = 0;
35static constexpr size_t CMD_STEER_WHEEL = 1;
36
37static constexpr size_t NR_STATE_ITFS = 2;
38static constexpr size_t NR_CMD_ITFS = 2;
39static constexpr size_t NR_REF_ITFS = 2;
40
42{
43public:
45
46 BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC controller_interface::CallbackReturn
47 configure_odometry() override;
48
49 BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC bool update_odometry(
50 const rclcpp::Duration & period) override;
51
52 BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC void initialize_implementation_parameter_listener()
53 override;
54
55protected:
56 std::shared_ptr<bicycle_steering_controller::ParamListener> bicycle_param_listener_;
57 bicycle_steering_controller::Params bicycle_params_;
58};
59} // namespace bicycle_steering_controller
60
61#endif // BICYCLE_STEERING_CONTROLLER__BICYCLE_STEERING_CONTROLLER_HPP_
Definition bicycle_steering_controller.hpp:42
Definition steering_controllers_library.hpp:48