PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
Loading...
Searching...
No Matches
trajectory_executor.hpp
1/****************************************************************************
2 * Copyright (c) 2024 PX4 Development Team.
3 * SPDX-License-Identifier: BSD-3-Clause
4 ****************************************************************************/
5
6#pragma once
7#include <functional>
8#include <memory>
9#include <px4_ros2/mission/mission.hpp>
10
11namespace px4_ros2 {
21 public:
24 virtual ~TrajectoryExecutorInterface() = default;
25
26 virtual bool navigationItemTypeSupported(NavigationItemType type) = 0;
27 virtual bool frameSupported(MissionFrame mission_frame) = 0;
28
30 std::shared_ptr<Mission> trajectory;
31 TrajectoryOptions options;
32 int start_index{0};
33 int end_index{0};
34 bool stop_at_last{true};
35 std::function<void(int)> on_index_reached;
36 std::function<void()> on_failure;
37 };
38 virtual void runTrajectory(const TrajectoryConfig& config) = 0;
39
40 virtual void updateSetpoint() = 0;
41};
42
44} /* namespace px4_ros2 */
Interface for a trajectory executor.
Definition trajectory_executor.hpp:20
Definition trajectory_executor.hpp:29
Definition mission.hpp:114