PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
Loading...
Searching...
No Matches
land_detected.hpp
1
/****************************************************************************
2
* Copyright (c) 2023-2024 PX4 Development Team.
3
* SPDX-License-Identifier: BSD-3-Clause
4
****************************************************************************/
5
6
#pragma once
7
8
#include <px4_msgs/msg/vehicle_land_detected.hpp>
9
#include <px4_ros2/common/context.hpp>
10
#include <px4_ros2/utils/subscription.hpp>
11
#include <px4_ros2/utils/message_version.hpp>
12
13
namespace
px4_ros2
14
{
24
class
LandDetected
:
public
Subscription
<px4_msgs::msg::VehicleLandDetected>
25
{
26
public
:
27
explicit
LandDetected
(
Context
& context)
28
:
Subscription<px4_msgs::msg::VehicleLandDetected>
(context,
29
"fmu/out/vehicle_land_detected"
+
30
px4_ros2::getMessageNameVersion<px4_msgs::msg::VehicleLandDetected>()) {}
31
37
bool
landed
()
const
38
{
39
return
last
().landed;
40
}
41
42
};
43
45
}
/* namespace px4_ros2 */
px4_ros2::Context
Definition
context.hpp:20
px4_ros2::LandDetected
Provides access to the vehicle's status.
Definition
land_detected.hpp:25
px4_ros2::LandDetected::landed
bool landed() const
Check if vehicle is landed on the ground.
Definition
land_detected.hpp:37
px4_ros2::Subscription
Provides a subscription to arbitrary ROS topics.
Definition
subscription.hpp:23
px4_ros2::Subscription< px4_msgs::msg::VehicleLandDetected >::last
const px4_msgs::msg::VehicleLandDetected & last() const
Get the last-received message.
Definition
subscription.hpp:58
px4_ros2_cpp
include
px4_ros2
vehicle_state
land_detected.hpp
Generated by
1.9.8