Skip to main content

PlanCheck

Struct PlanCheck 

Source
pub struct PlanCheck {
    pub clearance: f64,
    pub contact: Option<Vec<f64>>,
    pub nearest: Option<Vec<f64>>,
    pub own: Option<SelfClearance>,
    /* private fields */
}
Expand description

What a path keeps from the obstacles before it runs: the least clearance along it (m, infinite without obstacles), the first pose at which a part of the machine touches one (clearance 0 or less), and the first pose at the least clearance (None without obstacles). own is the least clearance between the machine’s own parts that are not joined (Machine::connected_bodies), a figure apart from the obstacles’; None where nothing was checked (fewer than two parts, or all of them joined), which is not the same as clear.

Fields§

§clearance: f64§contact: Option<Vec<f64>>§nearest: Option<Vec<f64>>§own: Option<SelfClearance>

Implementations§

Source§

impl PlanCheck

Source

pub fn keeping(clearance: f64) -> Self

A check that takes parts of the machine closer than clearance at the first pose as joined.

Source

pub fn at_start( clearance: f64, machine: &dyn Machine, state: &[f64], start: &[f64], detached: impl FnOnce() -> Result<Box<dyn Machine>, ConfigError>, ) -> Result<Self, ConfigError>

keeping, with the parts joined as they are at the machine’s start pose, whatever pose a path starts from: state is machine’s there with the payload on (as the controller starts). Where the machine names its joined pairs (Machine::connected_bodies) that is all; where the rule joins them by their distance, and some pair is left to check, also with the payload off, on a machine of its own that detached builds (switching the payload may leave more in a machine: a crane books a pick), at the start pose start.

Source

pub fn anew(&self) -> Self

A check with the same joined pairs and nothing seen yet.

Source

pub fn has_pairs(&self) -> bool

Whether the machine has two parts not joined to check, as far as the start pose tells (at_start).

Source

pub fn own_fails(&self, limit: f64) -> bool

Whether the machine’s own parts came nearer than limit (profile.min_clearance_m) or touched: as the check “collision” judges the obstacles, a contact fails whatever the limit. Not checked is not failed.

Source

pub fn look_at_parts( &mut self, boxes: &[Aabb], capsules: &[Capsule], connected: impl FnOnce() -> Option<Vec<(usize, usize)>>, pose: &[f64], )

look_at_own for parts given: connected tells the joined pairs of these parts where the machine knows them (Machine::connected_bodies), asked once for each number of boxes and capsules that at_start did not see.

Trait Implementations§

Source§

impl Clone for PlanCheck

Source§

fn clone(&self) -> PlanCheck

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PlanCheck

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for PlanCheck

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for PlanCheck

Source§

fn eq(&self, other: &PlanCheck) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PlanCheck

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.