Gimbal control class.
More...
#include <auterion_sdk/gimbal/gimbal.hpp>
◆ Gimbal() [1/2]
auterion::Gimbal::Gimbal |
( |
SDK & |
sdk, |
|
|
const std::function< bool(const GimbalDescriptor &candidate)> & |
find_callback |
|
) |
| |
Constructs a gimbal object based on a selection function.
Discovers and selects a gimbal connected to the system based on the given selection function. This method is blocking and waits for a suitable gimbal to be found.
- Parameters
-
sdk | Reference to SDK instance |
find_callback | Selection function to choose a gimbal candidate based on its descriptor |
◆ Gimbal() [2/2]
Constructs a gimbal object based on a descriptor.
Discovers and selects a gimbal connected to the system based on the given descriptor, using a pre-defined selection function. The selection function behaves as follows, in order:
- If a custom name is provided, the gimbal candidate must match the custom name.
- If vendor or model names are provided, the gimbal candidate must match the vendor and model names.
- If no custom name, vendor, or model names are provided, it checks capabilities.
This method is blocking and waits for a suitable gimbal to be found.
- Parameters
-
sdk | Reference to SDK instance |
descriptor | Gimbal descriptor which the selected gimbal must match |
◆ setAttitudeControl() [1/2]
void auterion::Gimbal::setAttitudeControl |
( |
const Eigen::Quaternionf & |
q | ) |
const |
Set attitude control using quaternion.
- Parameters
-
q | Reference to attitude quaternion |
quaternion is w.r.t. to vehicle heading (FLU) if gimbal yaw mode is VehicleFollow (default) quaternion is w.r.t. to world East (ENU) if gimbal yaw mode is WorldLock
◆ setAttitudeControl() [2/2]
void auterion::Gimbal::setAttitudeControl |
( |
const float |
roll_deg, |
|
|
const float |
pitch_deg, |
|
|
const float |
yaw_deg |
|
) |
| const |
Set attitude control using Euler angles.
- Parameters
-
roll_deg | Roll angle [deg], positive is right |
pitch_deg | Pitch angle [deg], positive is down |
yaw_deg | Yaw angle [deg], positive is left |
angles in FLU if gimbal yaw mode is VehicleFollow (default) angles in ENU if gimbal yaw mode is WorldLock
◆ setGimbalMode()
void auterion::Gimbal::setGimbalMode |
( |
const GimbalMode & |
gimbal_mode | ) |
|
Sets gimbal mode.
Affects subsequent control messages.
- Parameters
-
◆ setRateControl()
void auterion::Gimbal::setRateControl |
( |
const float |
roll_rate_rad_s, |
|
|
const float |
pitch_rate_rad_s, |
|
|
const float |
yaw_rate_rad_s |
|
) |
| const |
Set rate control.
- Parameters
-
roll_rate_rad_s | Roll rate [rad/s], FLU, positive is right |
pitch_rate_rad_s | Pitch rate [rad/s], FLU, positive is down |
yaw_rate_rad_s | Yaw rate [rad/s], FLU, positive is left |
◆ setRoiLocation()
Set Region of Interest (ROI) location.
- Parameters
-
position | Reference to global position |
◆ subscribeAttitude()
void auterion::Gimbal::subscribeAttitude |
( |
std::function< void(const GimbalAttitude &)> |
callback | ) |
|
Subscribe to gimbal attitude updates.
- Parameters
-
callback | Callback function to handle attitude updates |
◆ takeControl()
bool auterion::Gimbal::takeControl |
( |
const bool |
force_takeover = false | ) |
|
Take control of the gimbal.
This is required before sending control commands.
- Parameters
-
force_takeover | True to force takeover despite another component using it |
- Returns
- True if control was taken, false otherwise
The documentation for this class was generated from the following file: