Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
auterion::surface_vehicle::ThrustRateSetpoint Class Reference

Drive with a given forward thrust while turning at a given rate. More...

#include <auterion_sdk/control/surface_vehicle/thrust_rate_control.hpp>

Classes

class  Config
 Mode-wide limits for ThrustRateSetpoint. More...
 

Public Member Functions

 ThrustRateSetpoint (float thrust, float heading_rate_rad_s)
 
ThrustRateSetpoint & withThrust (float thrust)
 Sets the normalized thrust along the body x axis [-], in [-1, 1]. Negative drives in reverse.
 
ThrustRateSetpoint & withHeadingRate (float heading_rate_rad_s)
 Sets the yaw rate [rad/s]. Positive turns left (counter-clockwise seen from above).
 
float getThrust () const
 
float getHeadingRate () const
 

Detailed Description

Drive with a given forward thrust while turning at a given rate.

The flight controller handles turn rate control, the thrust is passed through without speed control. This is the lowest level of control in this API. Use it for joystick-like control without speed control, or when your own controllers handle both speed and heading.

Frames and units:

  • Thrust is the normalized thrust along the body x axis (forward) [-]. It takes values in [-1, 1], negative values drive in reverse. Values outside this range are clamped.
  • Heading rate is the yaw rate about the up axis [rad/s]. Positive turns left (counter-clockwise seen from above). This is the same convention as the rest of the SDK.

Defaults:

  • Thrust and heading rate default to 0, so an empty setpoint cuts the thrust without turning.

Example:

.withMaxHeadingRate(0.5f)});
mode.onUpdateSetpoint([&mode](float dt_s) -> auterion::Setpoint {
const auto input = mode.lastManualControlInput();
.withThrust(input.throttle_input_normalized)
.withHeadingRate(-0.5f * input.yaw_input_normalized);
});
Defines a mode to control the vehicle using a (set) of setpoint types.
Definition mode.hpp:280
void onUpdateSetpoint(const std::function< Setpoint(float)> &callback)
Sets a callback function to be called at periodically at the update frequency of the mode.
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
Drive with a given forward thrust while turning at a given rate.
Definition thrust_rate_control.hpp:76
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
std::variant< RateSetpoint, AttitudeSetpoint, multicopter::LocalFrameDynamicsSetpoint, multicopter::BodyFrameDynamicsSetpoint, multicopter::LocalFrameGotoSetpoint, multicopter::GlobalFrameGotoSetpoint, fixedwing::DynamicsSetpoint, fixedwing::GuidanceSetpoint, vtol::TransitionSetpoint, multicopter::LocalFrameAccelerationSetpoint, surface_vehicle::LocalFramePositionSetpoint, surface_vehicle::GlobalFramePositionSetpoint, surface_vehicle::SpeedAttitudeSetpoint, surface_vehicle::SpeedRateSetpoint, surface_vehicle::ThrustAttitudeSetpoint, surface_vehicle::ThrustRateSetpoint > Setpoint
Type alias for representing various types of setpoints.
Definition control.hpp:86

Constructor & Destructor Documentation

◆ ThrustRateSetpoint()

auterion::surface_vehicle::ThrustRateSetpoint::ThrustRateSetpoint ( float  thrust,
float  heading_rate_rad_s 
)
inline
Parameters
thrustNormalized thrust along the body x axis [-], in [-1, 1]. Negative drives in reverse.
heading_rate_rad_sYaw rate [rad/s]. Positive turns left.

The documentation for this class was generated from the following file: