ros2_control - rolling
Loading...
Searching...
No Matches
lifecycle_helpers.hpp
1// Copyright 2024 PAL Robotics S.L.
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__LIFECYCLE_HELPERS_HPP_
16#define HARDWARE_INTERFACE__LIFECYCLE_HELPERS_HPP_
17
18#include <lifecycle_msgs/msg/state.hpp>
19
20namespace hardware_interface
21{
22constexpr bool lifecycleStateThatRequiresNoAction(const lifecycle_msgs::msg::State::_id_type state)
23{
24 return state == lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN ||
25 state == lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED ||
26 state == lifecycle_msgs::msg::State::PRIMARY_STATE_FINALIZED;
27}
28} // namespace hardware_interface
29
30#endif // HARDWARE_INTERFACE__LIFECYCLE_HELPERS_HPP_
Definition actuator.hpp:33