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
impl PlanCheck
Sourcepub fn keeping(clearance: f64) -> Self
pub fn keeping(clearance: f64) -> Self
A check that takes parts of the machine closer than clearance at the first pose as joined.
Sourcepub fn at_start(
clearance: f64,
machine: &dyn Machine,
state: &[f64],
start: &[f64],
detached: impl FnOnce() -> Result<Box<dyn Machine>, ConfigError>,
) -> Result<Self, ConfigError>
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.
Sourcepub fn has_pairs(&self) -> bool
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).
Sourcepub fn own_fails(&self, limit: f64) -> bool
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.
Sourcepub fn look_at_parts(
&mut self,
boxes: &[Aabb],
capsules: &[Capsule],
connected: impl FnOnce() -> Option<Vec<(usize, usize)>>,
pose: &[f64],
)
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.