Neobotics Foundation Inc.
These docs are public and open source.Edit on GitHub

RC.VISION

The vision module provides object detections from the model running on the car.

METHODS

rc.vision.get_detections()returns List[Detection]

The object detections from the latest camera frame. Each Detection has class_id (the label string), score (confidence in 0 to 1), and bbox (center x, center y, width, height, in pixels).

rc.vision.get_detections_async()returns List[Detection]

The same detections but readable outside the start/update loop. This function should only be used in a Jupyter Notebook cell, after rc.go_async() has been called.

EXAMPLE USAGE

python
import racecar_core rc = racecar_core.create_racecar() def start(): pass def update(): for det in rc.vision.get_detections(): cx, cy, w, h = det.bbox print(f"{det.class_id} at ({cx}, {cy}), score {det.score:.2f}") rc.set_start_update(start, update) rc.go()

For full documentation, visit the racecar-neo-library documentation.