ros2_control - jazzy
Loading...
Searching...
No Matches
sensor_interface.hpp
1// Copyright 2020 - 2021 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__SENSOR_INTERFACE_HPP_
16#define HARDWARE_INTERFACE__SENSOR_INTERFACE_HPP_
17
18#include <vector>
19
20#include "hardware_interface/hardware_component_interface.hpp"
21
22namespace hardware_interface
23{
25
55{
56public:
57 std::vector<CommandInterface::SharedPtr> on_export_command_interfaces() override { return {}; }
58
59 return_type write(const rclcpp::Time & /*time*/, const rclcpp::Duration & /*period*/) final
60 {
61 return return_type::OK;
62 }
63};
64
65} // namespace hardware_interface
66#endif // HARDWARE_INTERFACE__SENSOR_INTERFACE_HPP_
Virtual base class for all hardware components (Actuators, Sensors, and Systems).
Definition hardware_component_interface.hpp:61
Virtual Class to implement when integrating a stand-alone sensor into ros2_control.
Definition sensor_interface.hpp:55
return_type write(const rclcpp::Time &, const rclcpp::Duration &) final
Write the current command values to the hardware.
Definition sensor_interface.hpp:59
std::vector< CommandInterface::SharedPtr > on_export_command_interfaces() override
Definition sensor_interface.hpp:57
Definition actuator.hpp:22