ContactDeadlineScenario
Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/learning.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A constant-speed drive into site’s latch plate: when the force ramp k v t reaches the tripwire and the limit, when braking can begin, and the time left, at both approaches.
Notes
Equation: Linear contact ramp F(t)=stiffness*speed*t; force-limit deadline=force_limit/(stiffness*speed).
Assumptions: Constant approach speed until brake onset, linear contact stiffness, and fixed response delay.
Excludes: Post-onset braking dynamics, nonlinear impact, and certified safety margins.
References
Implementation references: mlsysim.physics.robotics.actuation.calc_contact_force, mlsysim.physics.robotics.actuation.calc_contact_yield_deadline. These helper contracts state the source assumptions; the scenario binds their inputs and derives the displayed ratios and budgets.
Examples
The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.LatchContactDeadlines
>>> round((scenario.time_left_guarded).to('ms').magnitude, 6)
5.083333Attributes
| Name | Description |
|---|---|
| brake_onset_fast | Brake onset time in ms at faster speed, via brake_onset. |
| brake_onset_guarded | Brake onset time in ms at guarded speed, via brake_onset. |
| compression_left_guarded | Remaining linear-spring compression in mm before the force limit at guarded brake onset; negative values indicate excess force already. |
| deadline_fast | Force-limit deadline in ms at faster speed, via deadline. |
| deadline_guarded | Force-limit deadline in ms at guarded speed, via deadline. |
| fast_margin_ratio | Dimensionless force-limit deadline divided by brake-onset time at faster speed; a timing comparison, not a safety certificate. |
| fast_speed | Faster comparison velocity supplied by the site’s v_latch_high. |
| force_at_brake_onset_guarded | Brake-onset force in N at the guarded speed, via force_at_brake_onset. |
| guarded_speed | Guarded approach velocity supplied by the site’s v_latch_approach. |
| site | |
| stall | |
| stall_force | Linear-spring contact force in N after that stall travel, via calc_contact_force. |
| stall_over_limit | Dimensionless stall-force-to-limit ratio; values above one exceed the declared limit under the model. |
| stall_travel | Unbraked constant-speed travel in mm during the optional stall duration at guarded speed. |
| time_left_fast | Remaining response margin in ms at faster speed, via time_left. |
| time_left_guarded | Remaining response margin in ms at guarded speed, via time_left. |
| tripwire_fast | Tripwire crossing time in ms at faster speed, via tripwire_time. |
| tripwire_guarded | Tripwire crossing time in ms at guarded speed, via tripwire_time. |
Methods
| Name | Description |
|---|---|
| brake_onset | Brake-command onset in ms: tripwire crossing plus the site’s fixed contact-response delay. |
| deadline | Time in ms for a constant-speed linear spring contact to reach the force limit, via calc_contact_yield_deadline. |
| force_at_brake_onset | Force in N when braking begins, multiplying constant force rate by the modeled onset time. |
| force_rate | Linear contact-force rise in N/ms: site stiffness times constant approach speed. |
| time_left | Milliseconds from brake onset to the force-limit crossing; negative values mean the assumed response is already late. |
| tripwire_time | Time in ms to reach the tripwire force under the ramp stiffness * speed * time. |
brake_onset
engine.scenario_types.ContactDeadlineScenario.brake_onset(speed)Brake-command onset in ms: tripwire crossing plus the site’s fixed contact-response delay.
Equation: (self.tripwire_time(speed) + self.site.t_contact_response).to(‘ms’)
deadline
engine.scenario_types.ContactDeadlineScenario.deadline(speed)Time in ms for a constant-speed linear spring contact to reach the force limit, via calc_contact_yield_deadline.
Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.
force_at_brake_onset
engine.scenario_types.ContactDeadlineScenario.force_at_brake_onset(speed)Force in N when braking begins, multiplying constant force rate by the modeled onset time.
Equation: (self.force_rate(speed) * self.brake_onset(speed)).to(‘N’)
force_rate
engine.scenario_types.ContactDeadlineScenario.force_rate(speed)Linear contact-force rise in N/ms: site stiffness times constant approach speed.
Equation: (self.site.k_latch * speed).to(‘N/ms’)
time_left
engine.scenario_types.ContactDeadlineScenario.time_left(speed)Milliseconds from brake onset to the force-limit crossing; negative values mean the assumed response is already late.
Equation: (self.deadline(speed) - self.brake_onset(speed)).to(‘ms’)
tripwire_time
engine.scenario_types.ContactDeadlineScenario.tripwire_time(speed)Time in ms to reach the tripwire force under the ramp stiffness * speed * time.
Equation: (self.site.f_latch_tripwire / (self.site.k_latch * speed)).to(‘ms’)
site
Type: Any.
Declared default: required.
guarded_speed
engine.scenario_types.ContactDeadlineScenario.guarded_speed
Guarded approach velocity supplied by the site’s v_latch_approach.
Equation: self.site.v_latch_approach
fast_speed
engine.scenario_types.ContactDeadlineScenario.fast_speed
Faster comparison velocity supplied by the site’s v_latch_high.
Equation: self.site.v_latch_high
deadline_guarded
engine.scenario_types.ContactDeadlineScenario.deadline_guarded
Force-limit deadline in ms at guarded speed, via deadline.
Equation: self.deadline(self.guarded_speed)
deadline_fast
engine.scenario_types.ContactDeadlineScenario.deadline_fast
Force-limit deadline in ms at faster speed, via deadline.
Equation: self.deadline(self.fast_speed)
tripwire_guarded
engine.scenario_types.ContactDeadlineScenario.tripwire_guarded
Tripwire crossing time in ms at guarded speed, via tripwire_time.
Equation: self.tripwire_time(self.guarded_speed)
tripwire_fast
engine.scenario_types.ContactDeadlineScenario.tripwire_fast
Tripwire crossing time in ms at faster speed, via tripwire_time.
Equation: self.tripwire_time(self.fast_speed)
brake_onset_guarded
engine.scenario_types.ContactDeadlineScenario.brake_onset_guarded
Brake onset time in ms at guarded speed, via brake_onset.
Equation: self.brake_onset(self.guarded_speed)
brake_onset_fast
engine.scenario_types.ContactDeadlineScenario.brake_onset_fast
Brake onset time in ms at faster speed, via brake_onset.
Equation: self.brake_onset(self.fast_speed)
time_left_guarded
engine.scenario_types.ContactDeadlineScenario.time_left_guarded
Remaining response margin in ms at guarded speed, via time_left.
Equation: self.time_left(self.guarded_speed)
time_left_fast
engine.scenario_types.ContactDeadlineScenario.time_left_fast
Remaining response margin in ms at faster speed, via time_left.
Equation: self.time_left(self.fast_speed)
fast_margin_ratio
engine.scenario_types.ContactDeadlineScenario.fast_margin_ratio
Dimensionless force-limit deadline divided by brake-onset time at faster speed; a timing comparison, not a safety certificate.
Equation: (self.deadline_fast / self.brake_onset_fast).to(’’).magnitude
stall
Type: Optional[Quantity].
Declared default: None.
force_at_brake_onset_guarded
engine.scenario_types.ContactDeadlineScenario.force_at_brake_onset_guarded
Brake-onset force in N at the guarded speed, via force_at_brake_onset.
Equation: self.force_at_brake_onset(self.guarded_speed)
compression_left_guarded
engine.scenario_types.ContactDeadlineScenario.compression_left_guarded
Remaining linear-spring compression in mm before the force limit at guarded brake onset; negative values indicate excess force already.
Equation: ((self.site.f_latch_limit - self.force_at_brake_onset_guarded) / self.site.k_latch).to(‘mm’)
stall_travel
engine.scenario_types.ContactDeadlineScenario.stall_travel
Unbraked constant-speed travel in mm during the optional stall duration at guarded speed.
Equation: (self.guarded_speed * self.stall).to(‘mm’)
stall_force
engine.scenario_types.ContactDeadlineScenario.stall_force
Linear-spring contact force in N after that stall travel, via calc_contact_force.
Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.
stall_over_limit
engine.scenario_types.ContactDeadlineScenario.stall_over_limit
Dimensionless stall-force-to-limit ratio; values above one exceed the declared limit under the model.
Equation: (self.stall_force / self.site.f_latch_limit).to(’’).magnitude