Peripheral Actuator Control API
{% hint style="info" %}
Related C++ Header in the Auterion SDK:<auterion_sdk/control/common/peripheral_actuator_controls.hpp>
{% endhint %}
Auterion SDK provides an interface to control independent/generic actuators of the vehicle, that is, actuators which do not control the vehicle's motion or hardware that is not directly integrated with PX4, such as a payload servo. The control interface allows to set the value of up to 6 independent actuators, provided first that the outputs are configured as Actuator Set x.
Set peripheral actuator values
Instantiate an auterion::PeripheralActuatorControls
object by passing your auterion::SDK
instance:
cpp
auterion::PeripheralActuatorControls peripheral_actuator_controls(sdk);
Set your configured actuators to their desired state (in range [-1, 1]
) using the set(...)
method:
cpp
// Set values for actuators 0-2, ignore actuators 3-5
Eigen::Matrix<float, 6, 1> params{-1.F, -.2F, .5F, NAN, NAN, NAN};
peripheral_actuator_controls.set(params);
Alternatively, set(...)
is overloaded to set the value of a specific actuator:
cpp
float param_value = 0.1F; // range [-1, 1]
unsigned int actuator_index = 2; // range [0, numActuators), numActuators = 6
peripheral_actuator_controls.set(param_value, actuator_index);
Comments
0 comments
Please sign in to leave a comment.