Skip to main content

HeadingDriftScenario

Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/contact.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

A persistent heading_offset at machine’s drive limit in site’s aisle: the angular error an open-loop replay scores, and where the closed loop spends the side clearance (y = v sin(eps) t).

Notes

Equation: Lateral velocity equals speed times sin(heading); clearance divided by lateral velocity gives the deadline.

Assumptions: A constant nonzero heading error and constant drive speed on a straight aisle.

Excludes: Feedback correction, acceleration, and varying terrain.

References

Derivation: Lateral velocity equals speed times sin(heading); clearance divided by lateral velocity gives the deadline. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.

Examples

Evaluate a named scenario using its declared inputs.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.AisleHeadingDrift
>>> round(float(scenario.speed.magnitude), 4)
1.5

Attributes

Name Description
aisle_fraction Dimensionless path-to-clearance length divided by aisle length.
angular_mse Squared persistent heading error in radians squared.
distance_to_clearance Forward path length in meters traveled before the lateral clearance is spent.
heading Persistent heading error as a dimensionless angle in radians.
heading_offset
machine
site
speed Machine’s maximum drive speed from its registered base specification.
time_to_clearance Seconds until constant lateral velocity speed*sin(heading) spends the available side

machine

Type: Any.

Declared default: required.

site

Type: Any.

Declared default: required.

heading_offset

Type: Quantity.

Declared default: required.

speed

engine.scenario_types.HeadingDriftScenario.speed

Machine’s maximum drive speed from its registered base specification.

Equation: machine.base.max_velocity.

heading

engine.scenario_types.HeadingDriftScenario.heading

Persistent heading error as a dimensionless angle in radians.

The offset in radians.

Equation: _math.radians(heading_offset.to('degree').magnitude).

angular_mse

engine.scenario_types.HeadingDriftScenario.angular_mse

Squared persistent heading error in radians squared.

Equation: (Q_(heading, 'radian') ** 2).to('radian**2').

time_to_clearance

engine.scenario_types.HeadingDriftScenario.time_to_clearance

Seconds until constant lateral velocity speed*sin(heading) spends the available side clearance.

Equation: (site.side_clearance / (speed * _math.sin(heading))).to('s').

distance_to_clearance

engine.scenario_types.HeadingDriftScenario.distance_to_clearance

Forward path length in meters traveled before the lateral clearance is spent.

Equation: (speed * time_to_clearance).to('m').

aisle_fraction

engine.scenario_types.HeadingDriftScenario.aisle_fraction

Dimensionless path-to-clearance length divided by aisle length.

Equation: (distance_to_clearance / site.aisle_length).to('').magnitude.

Back to top