39namespace surface_vehicle {
81 std::optional<float> _heading_rad{};
99 _max_thrust = max_thrust;
103 inline std::optional<float> getMaxThrust()
const {
return _max_thrust; }
106 std::optional<float> _max_thrust{};
109 ThrustAttitudeSetpoint() =
default;
118 : _thrust(thrust), _heading_rad(heading_rad) {}
134 _heading_rad = heading_rad;
138 inline float getThrust()
const {
return _thrust; }
139 inline std::optional<float> getHeading()
const {
return _heading_rad; }
Mode-wide limits for ThrustAttitudeSetpoint.
Definition thrust_attitude_control.hpp:90
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_attitude_control.hpp:98
Drive with a given forward thrust while holding a heading.
Definition thrust_attitude_control.hpp:78
ThrustAttitudeSetpoint & withThrust(float thrust)
Sets the normalized thrust along the body x axis [-], in [-1, 1]. Negative drives in reverse.
Definition thrust_attitude_control.hpp:124
ThrustAttitudeSetpoint & withHeading(float heading_rad)
Sets the heading in the local ENU frame [rad]. 0 is East, positive is counter-clockwise.
Definition thrust_attitude_control.hpp:133
ThrustAttitudeSetpoint(float thrust, float heading_rad)
Definition thrust_attitude_control.hpp:117