Struct Robot

Source
pub struct Robot<'a> {
    pub position: Position,
    pub orientation: Orientation,
    pub leds: GameDataLedsValue,
    pub penalized: bool,
    pub penalized_remaining: Option<u32>,
    pub penalized_reason: Option<String>,
    pub preempted: bool,
    pub preemption_reasons: Vec<String>,
    pub number: RobotNumber,
    pub team: Team,
    pub client: &'a Client,
}

Fields§

§position: Position§orientation: Orientation§leds: GameDataLedsValue§penalized: bool§penalized_remaining: Option<u32>§penalized_reason: Option<String>§preempted: bool§preemption_reasons: Vec<String>§number: RobotNumber§team: Team§client: &'a Client

Implementations§

Source§

impl Robot<'_>

Source

pub async fn send_command(&self, command: Command) -> RskResult<()>

Source

pub fn refresh(&mut self) -> RskResult<()>

Source

pub fn get_pose(&mut self) -> RskResult<AbsPose>

Source

pub fn get_cache_pose(&self) -> AbsPose

Source

pub async fn get_destination(&self) -> RskResult<Option<Destination>>

Source

pub async fn is_arrived(&self) -> RskResult<bool>

Source

pub async fn goto(&self, destination: Destination) -> RskResult<()>

Source

pub async fn stop(&self) -> RskResult<()>

Source

pub async fn goto_blocking(&self, destination: Destination) -> RskResult<()>

Source

pub async fn kick(&self, power: f32) -> RskResult<()>

Trait Implementations§

Source§

impl Debug for Robot<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Robot<'a>

§

impl<'a> !RefUnwindSafe for Robot<'a>

§

impl<'a> Send for Robot<'a>

§

impl<'a> Sync for Robot<'a>

§

impl<'a> Unpin for Robot<'a>

§

impl<'a> !UnwindSafe for Robot<'a>

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.