town_crossing_state — DRIVE town op

• 数据种类:table → table

• 调用: import fullseye as fs; fs.ledger.town_crossing_state(world: 'dict', t: 'float', train: 'Optional[dict]', *, exposure: 'float' = 0.0) -> 'Dict[str, object]'(要直接调用实现,import drivetown; drivetown.town_crossing_state(world: 'dict', t: 'float', train: 'Optional[dict]', *, exposure: 'float' = 0.0) -> 'Dict[str, object]';从台账取用则 opsdrive.get("town_crossing_state"))

用法

把时刻 t 的铁路道口设备状态写入世界(所有道口使用同一列车时刻)。

train = town_run 的 run["train"](None = 待机: 栏杆升起、灯熄灭、列车在远处)。状态用现有 op drivecrossing.crossing_gate_state(警报 → 下降 → 关闭 → 上升,栏杆的角度)和 drivecrossing.crossing_lamp_signal (2 灯交替闪烁,exposure > 0 时为相机曝光平均)评估。列车车头在 t_arrival 到达道路边缘(前方 margin), 以 v_train 向 +y(局部)行进。返回值 {"state", "state_name", "boom_angle", "lamps", "entry_forbidden", "train_y"}。

Raises ValueError: world 不是 town_world 生成的、t 非有限、train 的键不足。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者、年份)与用途见上面的族使用指南。

可运行的示例(实际调用该算子并已验证的样例)

• poc_driving_town — py -3.11 examples/poc_driving_town.py

类型可衔接的下一个算子(可接受 table 作为输入)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

同类别(town)

town_chain · town_layout · town_world · town_centerline · town_stop_lines · town_rules · town_run · town_checks


*Provenance: drivetown.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.