Struct Commander

Source
pub struct Commander { /* private fields */ }
Expand description

§Low level setpoint subsystem

This struct implements methods to send low level setpoints to the Crazyflie. See the commander module documentation for more context and information.

Implementations§

Source§

impl Commander

§Legacy RPY+ setpoint

This setpoint was originally the only one present in the Crazyflie and has been (ab)used to implement the early position control and other assisted and semi-autonomous mode.

Source

pub async fn setpoint_rpyt( &self, roll: f32, pitch: f32, yaw: f32, thrust: u16, ) -> Result<()>

Set the Roll Pitch Yaw Thrust setpoint

When not modified by parameters, the meaning of the argument are:

  • Roll/Pitch are in degree and represent the absolute angle
  • Yaw is in degree per seconds and represents the rotation rate
  • Thrust is a 16 bit value where 0 maps to 0% thrust and 65535 to 100% thrust

The thrust is blocked by default. The setpoint needs to be set once with thrust = 0 to unlock the thrust for example:

cf.commander.setpoint_rpyt(0.0, 0.0, 0.0, 0);      // Unlocks the thrust
cf.commander.setpoint_rpyt(0.0, 0.0, 0.0, 1000);   // Thrust set to 1000
Source§

impl Commander

This impl block contains no items.

§Generic setpoints

These setpoints are implemented in such a way that they are easy to add in the Crazyflie firmware and in libs like this one. So if you have a use-case not covered by any of the existing setpoint do not hesitate to implement and contribute your dream setpoint :-).

Trait Implementations§

Source§

impl Debug for Commander

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,