add_signal_jp — DRIVE roadjp op

• Data kinds: table → scalar

• Call: import fullseye as fs; fs.ledger.add_signal_jp(world: 'dict', x: 'float', y: 'float', yaw: 'float', *, state: 'str' = 'red', arm: 'float' = 2.0, lamp_bottom: 'float' = 5.0, pole_radius: 'float' = 0.08, arm_side: 'str' = 'left', lens: 'float' = 0.3, hood: 'bool' = True) -> 'int' (to call the implementation directly, import roadjp; roadjp.add_signal_jp(world: 'dict', x: 'float', y: 'float', yaw: 'float', *, state: 'str' = 'red', arm: 'float' = 2.0, lamp_bottom: 'float' = 5.0, pole_radius: 'float' = 0.08, arm_side: 'str' = 'left', lens: 'float' = 0.3, hood: 'bool' = True) -> 'int'; from the registry, opsdrive.get("add_signal_jp"))

Usage

Erects a Japanese-style traffic signal: post + horizontal arm + signal head (horizontal, 3 lamps; the display face points toward vehicles approaching in the yaw direction).

Placement (per the commentary on the traffic-signal installation guidelines: ordinary vehicle signal heads go on the far side of the intersection = exit side): the pole stands at (x, y) (height lamp_bottom + 0.7); the arm extends horizontally by arm to the right as seen by the driver of the approaching vehicle (over the lane; −y at yaw 0) (standard 2.0 m; beyond the 3.5 m maximum raises ValueError), and the signal head is hung with its centre at the arm tip (bottom of the head = lamp_bottom, default 5.0 m; below 4.5 m raises ValueError — traffic signal construction specification, to be confirmed against the primary source). With arm_side="right" the pole is on the driver's right and the arm extends to the left. Display-face normal = (−cos yaw, −sin yaw); the lenses, seen from the driver, are green, yellow, red from the left.

objects: pole + arm (label 3, name "signal_pole") and signal head (label 3, name "traffic_light", extra = {"state", "lamp_faces"(世界の面索引), "arm", "lamp_bottom", "kind": "jp"}). Return value = index of the signal head (driveworld.set_signal_state is applied to it).

Empty input (world as an empty dict) raises ValueError.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• gallery_drive_japan_roads — py -3.11 examples/gallery_drive_japan_roads.py

Ops the type connects to (they accept scalar as input)

spin_from_marker_sequence · carla_transform_matrix · carla_pose_to_world · carla_camera_pose · carla_xy_yaw · carla_scene_load · town_chain · osm_parse

Same category (roadjp)

sign_params · sign_image · plate_mesh_from_image · sign_mesh · add_sign · signal_jp_mesh


*Provenance: roadjp.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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