Flyby SDK v0.3.0
Loading...
Searching...
No Matches
gimbal.h
Go to the documentation of this file.
1
8#pragma once
9
11#include <flyby/util/error.h>
12
13namespace flyby {
19 LOCK = 0,
20 FOLLOW
21 };
22
28 class GimbalInterface : public Component {
29 public:
30 virtual void set_roll_pitch_yaw_angle(double roll, double pitch, double yaw) = 0;
31
32 virtual void set_roll_pitch_yaw_speed(double roll, double pitch, double yaw) = 0;
33
34 virtual GimbalMode get_gimbal_mode() = 0;
35
36 virtual void set_gimbal_mode(GimbalMode mode) = 0;
37
38 [[nodiscard]] virtual double get_roll() const = 0;
39
40 [[nodiscard]] virtual double get_pitch() const = 0;
41
42 [[nodiscard]] virtual double get_yaw() const = 0;
43 };
52 class Gimbal : public GimbalInterface {
53 public:
57 Gimbal() = default;
58
59 ~Gimbal() override = default;
60
70 }
71
79 void set_gimbal_mode(GimbalMode mode) override {
81 }
82
92 void set_roll_pitch_yaw_angle(double roll, double pitch, double yaw) override {
94 }
95
105 void set_roll_pitch_yaw_speed(double roll, double pitch, double yaw) override {
106 throw not_implemented_error();
107 }
108
116 [[nodiscard]] double get_roll() const override {
117 throw not_implemented_error();
118 }
119
127 [[nodiscard]] double get_pitch() const override {
128 throw not_implemented_error();
129 }
130
138 [[nodiscard]] double get_yaw() const override {
139 throw not_implemented_error();
140 }
141 };
142}
The base gimbal class.
Definition gimbal.h:52
double get_yaw() const override
Returns current yaw angle.
Definition gimbal.h:138
void set_gimbal_mode(GimbalMode mode) override
Sets the gimbal mode.
Definition gimbal.h:79
double get_pitch() const override
Returns current pitch angle.
Definition gimbal.h:127
double get_roll() const override
Returns current roll angle.
Definition gimbal.h:116
Gimbal()=default
The default constructor.
void set_roll_pitch_yaw_speed(double roll, double pitch, double yaw) override
Sets the speed of rotation of the roll, pitch, and yaw.
Definition gimbal.h:105
GimbalMode get_gimbal_mode() override
Gets the gimbal mode.
Definition gimbal.h:68
void set_roll_pitch_yaw_angle(double roll, double pitch, double yaw) override
Sets the angle of the roll, pitch, and yaw.
Definition gimbal.h:92
An error representing a function that is not implemented.
Definition error.h:17
GimbalMode
The gimbal movement mode.
Definition gimbal.h:18