39namespace surface_vehicle {
79 float _heading_rate_rad_s{0.f};
97 _max_thrust = max_thrust;
106 _max_heading_rate_rad_s = max_heading_rate_rad_s;
110 inline std::optional<float> getMaxThrust()
const {
return _max_thrust; }
111 inline std::optional<float> getMaxHeadingRate()
const {
return _max_heading_rate_rad_s; }
114 std::optional<float> _max_thrust{};
115 std::optional<float> _max_heading_rate_rad_s{};
118 ThrustRateSetpoint() =
default;
126 : _thrust(thrust), _heading_rate_rad_s(heading_rate_rad_s) {}
141 _heading_rate_rad_s = heading_rate_rad_s;
145 inline float getThrust()
const {
return _thrust; }
146 inline float getHeadingRate()
const {
return _heading_rate_rad_s; }
Mode-wide limits for ThrustRateSetpoint.
Definition thrust_rate_control.hpp:88
Config & withMaxThrust(float max_thrust)
Limits the absolute forward and reverse thrust [-], in [0, 1]. Unset means a limit of 1 (full thrust)...
Definition thrust_rate_control.hpp:96
Config & withMaxHeadingRate(float max_heading_rate_rad_s)
Limits the absolute heading rate [rad/s]. Unset means no limit beyond the flight controller's.
Definition thrust_rate_control.hpp:105
Drive with a given forward thrust while turning at a given rate.
Definition thrust_rate_control.hpp:76
ThrustRateSetpoint(float thrust, float heading_rate_rad_s)
Definition thrust_rate_control.hpp:125
ThrustRateSetpoint & withHeadingRate(float heading_rate_rad_s)
Sets the yaw rate [rad/s]. Positive turns left (counter-clockwise seen from above).
Definition thrust_rate_control.hpp:140
ThrustRateSetpoint & withThrust(float thrust)
Sets the normalized thrust along the body x axis [-], in [-1, 1]. Negative drives in reverse.
Definition thrust_rate_control.hpp:132