SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
cl_px4_mr
include
cl_px4_mr
components
cp_offboard_keep_alive.hpp
Go to the documentation of this file.
1
// Copyright 2025 Robosoft 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
#pragma once
16
17
#include <px4_msgs/msg/offboard_control_mode.hpp>
18
#include <rclcpp/rclcpp.hpp>
19
#include <
smacc2/smacc.hpp
>
20
21
namespace
cl_px4_mr
22
{
23
24
class
CpTrajectorySetpoint;
25
26
class
CpOffboardKeepAlive
:
public
smacc2::ISmaccComponent
,
public
smacc2::ISmaccUpdatable
27
{
28
public
:
29
CpOffboardKeepAlive
();
30
virtual
~CpOffboardKeepAlive
();
31
32
void
onInitialize
()
override
;
33
void
update
()
override
;
34
35
void
enable
();
36
void
disable
();
37
bool
isEnabled
()
const
;
38
39
private
:
40
rclcpp::Publisher<px4_msgs::msg::OffboardControlMode>::SharedPtr
publisher_
;
41
CpTrajectorySetpoint
*
trajectorySetpoint_
=
nullptr
;
42
bool
enabled_
=
false
;
43
};
44
45
}
// namespace cl_px4_mr
cl_px4_mr::CpOffboardKeepAlive
Definition
cp_offboard_keep_alive.hpp:27
cl_px4_mr::CpOffboardKeepAlive::enabled_
bool enabled_
Definition
cp_offboard_keep_alive.hpp:42
cl_px4_mr::CpOffboardKeepAlive::~CpOffboardKeepAlive
virtual ~CpOffboardKeepAlive()
Definition
cp_offboard_keep_alive.cpp:23
cl_px4_mr::CpOffboardKeepAlive::publisher_
rclcpp::Publisher< px4_msgs::msg::OffboardControlMode >::SharedPtr publisher_
Definition
cp_offboard_keep_alive.hpp:40
cl_px4_mr::CpOffboardKeepAlive::trajectorySetpoint_
CpTrajectorySetpoint * trajectorySetpoint_
Definition
cp_offboard_keep_alive.hpp:41
cl_px4_mr::CpOffboardKeepAlive::onInitialize
void onInitialize() override
Definition
cp_offboard_keep_alive.cpp:25
cl_px4_mr::CpOffboardKeepAlive::update
void update() override
Definition
cp_offboard_keep_alive.cpp:36
cl_px4_mr::CpOffboardKeepAlive::enable
void enable()
Definition
cp_offboard_keep_alive.cpp:60
cl_px4_mr::CpOffboardKeepAlive::CpOffboardKeepAlive
CpOffboardKeepAlive()
Definition
cp_offboard_keep_alive.cpp:21
cl_px4_mr::CpOffboardKeepAlive::isEnabled
bool isEnabled() const
Definition
cp_offboard_keep_alive.cpp:72
cl_px4_mr::CpOffboardKeepAlive::disable
void disable()
Definition
cp_offboard_keep_alive.cpp:66
cl_px4_mr::CpTrajectorySetpoint
Definition
cp_trajectory_setpoint.hpp:29
smacc2::ISmaccComponent
Definition
component.hpp:30
smacc2::ISmaccUpdatable
Definition
smacc_updatable.hpp:33
cl_px4_mr
Definition
cl_px4_mr.hpp:28
smacc.hpp
Generated by
1.12.0