openpilot is a full-stack autonomous driver assistance system that runs on embedded Linux hardware (comma four/three) and controls 300+ car models. It is a safety-critical, real-time system written primarily in Python and C/C++, with a custom messaging layer (cereal/msgq) and a Cap'n Proto-based schema for all inter-process communication. The architecture is a collection of independent processes (controlsd, plannerd, radard, modeld, locationd, calibrationd, dmonitoringd, etc.) communicating via a pub/sub message queue, managed by a central process manager. The system ingests CAN bus data, camera streams (road, wide-road, driver), IMU/GPS sensor data, and runs neural network models (ONNX/tinygrad) for perception and planning. The codebase demonstrates strong engineering discipline: a comprehensive process replay regression testing framework that replays logged routes through individual processes and compares outputs bit-for-bit; a safety model implemented in the panda firmware (separate submodule) with ISO 26262 guidelines; real-time scheduling and CPU affinity management across processes; and a sophisticated build system using SCons with Cython compilation. The UI is built on raylib (with a Qt-based Cabana tool for CAN analysis), and there's a MetaDrive simulator bridge for development. Key architectural patterns include: a generic car interface abstraction (opendbc) that allows supporting 300+ car models through fingerprinting and parameter configuration; a model-driven control pipeline where neural network outputs (desired curvature, lead vehicle trajectories) feed into lateral controllers (PID, torque-based, curvature-based, angle-based) and longitudinal MPC planners; an EKF-based sensor fusion system (locationd) combining GPS, IMU, and vehicle odometry; and a driver monitoring system using a separate neural network for distraction detection. The system uses a parameter store (params) backed by a filesystem for persistent configuration. The repository includes extensive tooling: replay infrastructure for regression testing, PlotJuggler/Cabana integration for data visualization, automated car porting tools with fuzzy fingerprinting, release automation with stripped builds, and a comprehensive CI/CD pipeline with GitHub Actions. The codebase is actively maintained with daily commits, a structured release process (release-mici/release-tizi branches), and active community contribution through Discord and GitHub issues.
This repository is a full-stack advanced driver-assistance system (ADAS) that runs on dedicated hardware (comma devices) in vehicles. It processes camera and sensor data through neural network models to perceive the environment, plans trajectories, and controls the vehicle's lateral and longitudinal motion. The system includes a custom UI built with Raylib for both on-road driving displays and off-road settings, as well as cloud connectivity for telemetry, remote access, and settings backup/restore. It is a fork of commaai/openpilot with extensive modifications including neural network lateral control (NNLC), map data integration (OSM), a modular assistive driving system (MADS), and a proprietary cloud platform (sunnylink). The architecture is a set of daemon processes communicating via Cap'n Proto messaging over ZMQ/MSGQ, managed by a process manager. Key entry points include the launch script, process manager, control daemon, UI, and cloud connectivity daemon. The system relies on external dependencies like ONNX models, tinygrad for inference, OpenStreetMap data, and cloud services for telemetry and remote access. While primarily an application, it also contains research-oriented components such as model compilation pipelines, driving data analysis tools (cabana, replay), and extensive logging infrastructure for data collection.
Lcapy is a Python library for symbolic linear circuit analysis and signal processing, built on top of SymPy. It provides a comprehensive framework for analyzing linear time-invariant electrical circuits using netlists (SPICE-like syntax) or network expressions. The library supports multiple transform domains (time, Laplace, Fourier, angular Fourier, z, discrete-time, phasor, noise) and can symbolically compute nodal voltages, branch currents, transfer functions, Thevenin/Norton equivalents, state-space models, and two-port parameters. It also includes a schematic generation engine that produces publication-quality circuit diagrams via LaTeX/CircuitikZ. The architecture is modular, with a core expression class hierarchy that wraps SymPy expressions and provides domain-aware transforms, caching, and simplification. Key entry points include the `Circuit` class for netlist-based analysis, one-port components (`R`, `L`, `C`, `V`, `I`, etc.), two-port networks (`Series`, `Shunt`, `Ladder`, etc.), and domain variables (`t`, `s`, `f`, `z`, `n`). The library also offers discrete-time signal processing (sequences, DFT, DTFT, z-transform), filter design (LTIFilter, DLTIFilter), and numerical simulation via time-stepping. External dependencies include SymPy, NumPy, SciPy, Matplotlib, NetworkX, and a LaTeX distribution (for schematic rendering). The codebase is heavily mixin-based, with auto-generated expression classes and a custom netlist parser. It is primarily used for education, research, and engineering design, with extensive documentation, tutorials, and Jupyter notebook examples.
This repository is an educational book and accompanying code for learning algorithms for automated driving, specifically lane detection, vehicle control, and camera calibration. It uses the CARLA simulator to provide a realistic environment. The code is organized into exercises with provided solutions, test notebooks, and utility modules. The lane detection pipeline uses a deep learning segmentation model (trained with fastai) to detect lane boundaries in camera images, then applies inverse perspective mapping to convert pixel coordinates to road coordinates and fits polynomials to the lane boundaries. The control module implements PID for longitudinal control and pure pursuit for lateral control. The camera calibration module uses vanishing points to estimate camera yaw and pitch. The repository is primarily educational but contains well-structured, reusable components for camera geometry, geometric computations, and control algorithms. It is hybrid in nature, blending research/educational content with software components that could be extracted for other projects.