pub enum RobotContext {
ArmCommissioning,
ArmOperating,
LeggedStance,
LeggedSwing,
Maintenance,
}Expand description
The robot’s current operating regime.
Set by the caller from whatever state source is authoritative for
the deployment (ROS 2 mode topic, OPC UA OperationalStatus
node, programmable-logic flag, manual operator switch). DSFB never
transitions between contexts on its own — it is an observer.
Variants§
ArmCommissioning
Arm is being commissioned: dynamic parameter identification in progress, friction tables being populated, excitation trajectories being executed. Residuals are expected to be large and non-stationary. Violations are suppressed.
ArmOperating
Arm is in normal operation: trajectory tracking, force control, teleoperation. Residuals are expected to be small and stationary within the calibrated envelope. Full violation enforcement.
LeggedStance
Legged platform is in a stance phase: at least one end effector in contact with the ground, contact forces actively controlled by the whole-body controller. Residuals include MPC force tracking error and centroidal-momentum estimator discrepancy. Full violation enforcement.
LeggedSwing
Legged platform is in a swing phase: at least one end effector off the ground, swing-foot trajectory tracking active. Contact residuals are not applicable; only joint-level kinematic residuals are enforced. Full violation enforcement with a relaxed envelope (swing-phase residuals are typically looser than stance-phase).
Maintenance
Planned maintenance: operator-initiated diagnostics or mechanical service. Residuals may be very large as the robot is deliberately moved through unusual configurations. Violations are suppressed.
Implementations§
Source§impl RobotContext
impl RobotContext
Sourcepub const fn is_suppressed(self) -> bool
pub const fn is_suppressed(self) -> bool
Returns true if violations are suppressed in this context.
Commissioning and maintenance periods both produce residual
patterns that look like faults to a naive observer but are
expected by design. DSFB recognises these contexts and holds
the grammar FSM in Admissible.
Sourcepub fn admissibility_multiplier(self) -> f64
pub fn admissibility_multiplier(self) -> f64
Multiplier applied to the envelope radius ρ in this context.
ArmOperating,LeggedStance:1.0(baseline envelope).LeggedSwing:1.5(swing residuals run wider than stance).ArmCommissioning,Maintenance:f64::INFINITY(no violation possible — residuals are expected to be arbitrary).
The choice of 1.5 for swing is intentionally modest; the
caller may override with a custom envelope per-phase if a
tighter bound is known from the controller.
Trait Implementations§
Source§impl Clone for RobotContext
impl Clone for RobotContext
Source§fn clone(&self) -> RobotContext
fn clone(&self) -> RobotContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more