PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
navigation_interface_base.hpp
1
/****************************************************************************
2
* Copyright (c) 2023 PX4 Development Team.
3
* SPDX-License-Identifier: BSD-3-Clause
4
****************************************************************************/
5
6
#pragma once
7
8
#include <px4_ros2/common/context.hpp>
9
10
namespace
px4_ros2
11
{
12
16
class
NavigationInterfaceInvalidArgument
:
public
std::invalid_argument
17
{
18
public
:
19
explicit
NavigationInterfaceInvalidArgument
(
const
std::string & message)
20
: std::invalid_argument(
"PX4 ROS2 navigation interface: invalid argument: "
+ message) {}
21
};
22
26
class
PositionMeasurementInterfaceBase
:
public
Context
27
{
28
public
:
29
explicit
PositionMeasurementInterfaceBase
(
30
rclcpp::Node & node,
31
std::string topic_namespace_prefix =
""
)
32
:
Context
(node, std::move(topic_namespace_prefix)), _node(node) {}
33
virtual
~
PositionMeasurementInterfaceBase
() =
default
;
34
39
bool
doRegister
()
40
{
41
return
true
;
42
}
43
44
protected
:
45
rclcpp::Node & _node;
46
};
47
48
}
// namespace px4_ros2
px4_ros2::Context
Definition:
context.hpp:20
px4_ros2::NavigationInterfaceInvalidArgument
Thrown to report invalid arguments to measurement interface.
Definition:
navigation_interface_base.hpp:17
px4_ros2::PositionMeasurementInterfaceBase
Base class for position measurement interface.
Definition:
navigation_interface_base.hpp:27
px4_ros2::PositionMeasurementInterfaceBase::doRegister
bool doRegister()
Definition:
navigation_interface_base.hpp:39
px4_ros2_cpp
include
px4_ros2
navigation
experimental
navigation_interface_base.hpp
Generated by
1.9.1