PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
Loading...
Searching...
No Matches
overrides.hpp
1/****************************************************************************
2 * Copyright (c) 2023 PX4 Development Team.
3 * SPDX-License-Identifier: BSD-3-Clause
4 ****************************************************************************/
5
6#pragma once
7
8#include <rclcpp/rclcpp.hpp>
9
10#include <px4_msgs/msg/config_overrides.hpp>
11
12namespace px4_ros2
13{
14
15class ModeBase;
16class ModeExecutorBase;
17
19{
20public:
21 explicit ConfigOverrides(rclcpp::Node & node, const std::string & topic_namespace_prefix = "");
22
23 void controlAutoDisarm(bool enabled);
24
25private:
26 void update();
27
28 friend class ModeBase;
29 friend class ModeExecutorBase;
30 void deferFailsafes(bool enabled, int timeout_s = 0);
31 void setup(uint8_t type, uint8_t id);
32
33 rclcpp::Node & _node;
34
35 px4_msgs::msg::ConfigOverrides _current_overrides{};
36 rclcpp::Publisher<px4_msgs::msg::ConfigOverrides>::SharedPtr _config_overrides_pub;
37 bool _is_setup{false};
38 bool _require_update_after_setup{false};
39};
40
41} // namespace px4_ros2
Definition overrides.hpp:19
Base class for a mode.
Definition mode.hpp:70
Base class for a mode executor.
Definition mode_executor.hpp:31