Skip to main content

AVLite - Modular Autonomous Vehicle Stack for rapid prototyping, research, and education

Project description

AVLite Logo

AVLite - Modular Autonomous Vehicle Stack

AVLite is a lightweight, extensible autonomous vehicle software stack designed for rapid prototyping, research, and education. It provides clean abstractions for perception, planning, and control while maintaining flexibility through a plugin-based architecture.

ROS2 & Autoware Ready: Optional ROS2 executer plugin (avlite-executer-ROS2 in related-repos/) with native Autoware message support (Trajectory, ControlCommand, etc.).

Architecture Overview

AVLite follows a modular architecture with clear separation of concerns:

flowchart TB
    subgraph ENTRY[" "]
        direction LR
        VIZ["๐Ÿ–ฅ๏ธ Visualization ยท c50\nReal-time Tkinter GUI"]
        HL["โŒจ๏ธ Headless Mode\nTerminal dashboard ยท rich"]
        VIZ ~~~ HL
    end

    EXEC["โš™๏ธ Execution Layer ยท c40\nSyncExecuter ยท AsyncThreadedExecuter ยท Factory"]

    subgraph COMPONENTS[" "]
        direction LR
        PERC["Perception ยท c10 (optional)\nLocalization ยท Mapping\nDetection ยท Tracking ยท Prediction"]
        PLAN["Planning ยท c20\nGlobal ยท Local ยท Lattice"]
        CTRL["Control ยท c30\nStanley ยท PID"]
        WB["World Bridge ยท c40\nBasicSim ยท Carla ยท Gazebo ยท ROS2"]
        PERC ~~~ PLAN ~~~ CTRL ~~~ WB
    end

    COMMON["๐Ÿ”ง Common ยท c60\nSettings ยท Capabilities ยท TrajectoryTracker ยท CollisionChecker"]

    ENTRY --> EXEC
    EXEC --> COMPONENTS
    COMPONENTS --> COMMON

Core Components

  • c10_perception: Interfaces and built-in algorithms for detection (FastBEVLidarDetection), tracking (KalmanTracker), prediction, and localization (LidarLocalization); Map / RaceMap in c11; OpenDRIVE HDMap parser in c18
  • c20_planning: Global planning (GlobalCenterlineRacePlanner, HDMapGlobalPlanner) and local planning (VelocityLocalPlanner, lattice-based GreedyLatticePlanner)
  • c30_control: Vehicle control algorithms (Stanley, PID)
  • c40_execution: Execution orchestration with sync/async modes, simulator bridges, and replan_global()
  • c60_apps: App infrastructure (c61_app_strategy, c62_factory, c63_plugins, c64_settings_schema, c65_setting_utils, c68_paths); no tkinter
  • c50_common: Algorithm utilities only (c51โ€“c55: capabilities, sensor data, trajectory, collision, FPS)
  • plugins (avlite/plugins/): Built-in Tk visualizer package (p60_visualizer_tk), headless mode, config CLI; bridges and ROS executer live in related-repos/

Key Features

Strategy Pattern Architecture: All major components (perception, localization, planning, control) use the strategy pattern with automatic registration, allowing runtime selection and hot-reloading without code changes.

Capability-Based System: Components declare their requirements and capabilities, enabling automatic compatibility checking between perception/localization strategies and world bridges.

Optional Perception & Localization: Both perception and localization are optional in the execution pipeline. Run with ground truth data or plug in your own strategies as needed.

YAML-Based Configuration: Profile-based configuration system allows quick switching between different algorithm combinations and parameters.

Hot Reloading: Modify code and configuration files while the system is running without restarting.

Multiple Simulator Support: Works with BasicSim (built-in), CARLA, Gazebo, and ROS2/Autoware through abstract world bridge interface.

Extensible Plugin System: Add custom perception, planning, or control algorithms as plugins without modifying core code.

Why AVLite?

  • Lightweight: Small codebase focused on clarity over production complexity
  • No middleware lock-in: Works standalone; ROS2/Autoware integration is optional via avlite-executer-ROS2
  • Multi-simulator: Same code runs on BasicSim, Carla, or Gazebo
  • Rapid iteration: Hot-reload code and tune parameters without restarting
  • Minimal dependencies: Core needs only NumPy, Matplotlib, Tkinter
  • Educational: Numbered modules and clean abstractions for learning

Installation

Minimal (core functionality):

pip install -r requirements-minimal.txt

Full (dev tools, docs):

pip install -r requirements-full.txt

Optional integrations (install separately as needed):

  • CARLA: CARLA releases + avlite-bridge-carla plugin
  • Gazebo: ROS 2 + avlite-bridge-gazebo plugin
  • ROS2 + Autoware: ROS 2 (Humble+) and optionally autoware_auto_msgs; clone avlite-executer-ROS2 and/or avlite-bridge-ROS2 from related-repos/ (see Optional plugins)
  • Joystick: avlite-controller-joystick plugin (pip install -r related-repos/avlite-controller-joystick/requirements.txt)

Run from source:

python -m avlite

Install system-wide:

pip install .

Quick Start

  1. Launch the visualizer: python -m avlite
  2. Select a profile from the Config tab (e.g., "default")
  3. Click "Start/Stop Stack" to begin execution
  4. Right-click on the plot to spawn NPC vehicles
  5. Adjust parameters in real-time through the GUI

Headless Mode

For long-running deployments (robots, servers, CI) AVLite ships a minimal terminal dashboard that runs the executer without a GUI.

# Run with the 'default' profile
python -m avlite headless

# Pick a profile (saved from the visualizer)
python -m avlite headless -p my_robot_profile
python -m avlite headless my_robot_profile          # positional shortcut

# Useful options
python -m avlite headless -p my_robot_profile \
    --log-level WARNING \
    --control-dt 0.01 --replan-dt 0.5 --perceive

The dashboard shows live FPS, ego state, lap counter, and recent log lines. Press Ctrl+C to stop.

Requires the optional rich package:

pip install rich

Recommended workflow

  1. Configure with the visualizer (python -m avlite): pick the bridge, strategies, and tune parameters until it behaves the way you want.
  2. Save the result as a named profile from the Config tab.
  3. Transfer (optional): export the profile as a single .yaml from the settings window (T) or with python -m avlite setting-cli export-profile <name>, then import on the target machine with Import profile or setting-cli import-profile.
  4. Deploy that profile on your robot/server with python -m avlite headless -p <profile>.

The same YAML profiles drive both the GUI and headless mode, so what you see in the visualizer is what the robot will run.

Configuration files

Each profile is a single configs/<profile>.yaml file with sections for the core layers (c10_perception, c20_planning, c30_control, c40_execution), app bootstrap (c69_apps), and plugins (plugins:). Shipped defaults are in the repository configs/ directory. Saving from the GUI or settings window writes to ~/.config/avlite/ with the same filename; load prefers the user copy when present. User maps and trajectories live under ~/.config/avlite/data/; the Planning panel Save Global Plan button (โฌ‡) opens a file picker there. Set AVLITE_CONFIG_DIR or AVLITE_DATA_DIR to use different directories.

python -m avlite setting              # settings GUI (no visualizer)
python -m avlite setting-cli help
python -m avlite setting-cli validate --profile default
python -m avlite setting-cli export-profile myprofile -o myprofile.yaml
python -m avlite setting-cli import-profile myprofile.yaml --force

See Configuration in the docs for paths, CLI, and resetting to repo defaults.

Community Plugins

AVLite has a community plugin system that lets anyone publish perception, planning, control, executer, or world-bridge strategies as a small Git repository. Community and member plugins are third-party or unverified code; AV-Lab does not guarantee their safety. Use for research and development at your own risk.

Browse and install from the GUI:

python -m avlite plugins

The browser has Community (public registry) and Members (AV-Lab private registry) tabs. It fetches the official community registry (https://github.com/AV-Lab/avlite-community-plugins) and lets you install, uninstall, and register plugins with the active profile. Installed plugins live under $XDG_DATA_HOME/avlite/plugins (or ~/.local/share/avlite/plugins); override with AVLITE_PLUGINS_DIR.

Member plugins (Members tab): sign in with GitHub (Device Flow) to browse plugins from avlite-private-plugins. Your account must have access to that registry and each listed plugin repo. OAuth token is stored at ~/.config/avlite/github_oauth.json. Distribution builds set AVLITE_GITHUB_OAUTH_CLIENT_ID. See docs/index.md โ€” Member plugins for SSO and OAuth troubleshooting.

Publish your own plugin:

See the Plugin Development Guide โ€” Publish via pull request for prerequisites, registry fields, and a PR checklist. Summary:

  1. Build a plugin following the Plugin Development Guide.

  2. Push it to a public Git repository.

  3. Fork https://github.com/AV-Lab/avlite-community-plugins, add an entry to plugins.yaml:

    plugins:
      - name: my_perception_plugin
        description: One-line summary of what the plugin does
        repository: https://github.com/your-org/your-plugin-repo
        version: latest        # or a tag/commit SHA
        author: your-org
        category:
          - PerceptionStrategy
    
  4. Open a pull request. Once merged it shows up in every user's python -m avlite plugins browser for install and register.

Project Structure

AVLite uses a numbered module system for easy navigation:

avlite/
โ”œโ”€โ”€ c10_perception/         # Perception components (8 modules)
โ”‚   โ”œโ”€โ”€ c11_perception_model.py   # PerceptionModel, Map, RaceMap
โ”‚   โ”œโ”€โ”€ c12_perception_strategy.py
โ”‚   โ”œโ”€โ”€ c13_localization_strategy.py
โ”‚   โ”œโ”€โ”€ c14_mapping_strategy.py
โ”‚   โ”œโ”€โ”€ c15_perception_algs.py    # FastBEVLidarDetection, KalmanTracker, ConstantVelocityPrediction
โ”‚   โ”œโ”€โ”€ c16_localization_algs.py  # LidarLocalization (ICP)
โ”‚   โ”œโ”€โ”€ c18_hdmap_parser.py       # HDMap (OpenDRIVE parsing)
โ”‚   โ””โ”€โ”€ c19_settings.py
โ”œโ”€โ”€ c20_planning/           # Planning components
โ”‚   โ”œโ”€โ”€ c21_planning_model.py
โ”‚   โ”œโ”€โ”€ c22_global_planning_strategy.py
โ”‚   โ”œโ”€โ”€ c23_local_planning_strategy.py
โ”‚   โ”œโ”€โ”€ c24_global_hdmap_planners.py  # HDMapGlobalPlanner
โ”‚   โ”œโ”€โ”€ c25_global_race_planners.py   # GlobalCenterlineRacePlanner
โ”‚   โ”œโ”€โ”€ c26_local_path_planners.py                    # ReferencePathPlanner
โ”‚   โ”œโ”€โ”€ c27_local_behavioral_and_velocity_planners.py # CruiseBehavioralPlanner, VelocityLocalPlanner
โ”‚   โ”œโ”€โ”€ c28_local_lattice_planners.py                 # Node/Edge/Lattice, GreedyLatticePlanner
โ”‚   โ””โ”€โ”€ c29_settings.py
โ”œโ”€โ”€ c30_control/            # Control components
โ”‚   โ”œโ”€โ”€ c31_control_model.py
โ”‚   โ”œโ”€โ”€ c32_control_strategy.py
โ”‚   โ”œโ”€โ”€ c33_pid.py
โ”‚   โ”œโ”€โ”€ c34_stanley.py
โ”‚   โ””โ”€โ”€ c39_settings.py
โ”œโ”€โ”€ c40_execution/          # Execution and simulation
โ”‚   โ”œโ”€โ”€ c41_world_bridge.py
โ”‚   โ”œโ”€โ”€ c42_execution_strategy.py
โ”‚   โ”œโ”€โ”€ c44_sync_executer.py
โ”‚   โ”œโ”€โ”€ c45_async_threaded_executer.py
โ”‚   โ”œโ”€โ”€ c46_basic_sim.py
โ”‚   โ””โ”€โ”€ c49_settings.py
โ”œโ”€โ”€ c60_apps/               # App infrastructure (no tkinter)
โ”‚   โ”œโ”€โ”€ c61_app_strategy.py       # AppStrategy registry + bootstrap
โ”‚   โ”œโ”€โ”€ c62_factory.py            # executor_factory, load_stack_settings
โ”‚   โ”œโ”€โ”€ c63_plugins.py            # Plugin discovery, loading, log routing
โ”‚   โ”œโ”€โ”€ c64_settings_schema.py    # SettingsSchema, validation
โ”‚   โ”œโ”€โ”€ c65_setting_utils.py      # YAML profile load/save/export
โ”‚   โ””โ”€โ”€ c68_paths.py              # ConfigPaths, PluginPaths, DataPaths
โ”œโ”€โ”€ c50_common/             # Algorithm utilities (c51โ€“c55)
โ”‚   โ”œโ”€โ”€ c51_capabilities.py
โ”‚   โ”œโ”€โ”€ c52_sensor_datatypes.py
โ”‚   โ”œโ”€โ”€ c53_trajectory_tracker.py
โ”‚   โ”œโ”€โ”€ c54_collision_checking.py
โ”‚   โ””โ”€โ”€ c55_fps_tracker.py
โ””โ”€โ”€ plugins/               # Built-in plugins
    โ”œโ”€โ”€ p60_visualizer_tk/        # Tk visualizer + config + plugins apps (p61โ€“p69)
    โ”œโ”€โ”€ p60_setting_cli/
    โ””โ”€โ”€ p60_headless_mode/

related-repos/             # Optional plugins (see related-repos/README.md)
    โ”œโ”€โ”€ avlite-bridge-carla/
    โ”œโ”€โ”€ avlite-bridge-gazebo/
    โ”œโ”€โ”€ avlite-bridge-ROS2/
    โ”œโ”€โ”€ avlite-controller-joystick/
    โ””โ”€โ”€ avlite-executer-ROS2/

The numbering scheme allows quick navigation: search for "c23" to find local planning, "c34" for Stanley controller, etc.

Optional plugins (related-repos/)

Plugin Repository folder Role
avlite-bridge-carla related-repos/avlite-bridge-carla/ CARLA world bridge
avlite-bridge-gazebo related-repos/avlite-bridge-gazebo/ Gazebo Ignition bridge
avlite-bridge-ROS2 related-repos/avlite-bridge-ROS2/ External ROS world bridge
avlite-controller-joystick related-repos/avlite-controller-joystick/ Gamepad controller
avlite-executer-ROS2 related-repos/avlite-executer-ROS2/ Multiprocess ROS executer

Register in c62_community_plugins in the c69_apps section of configs/<profile>.yaml (shipped profiles already include repo-relative paths). Community plugin settings live under the profile's plugins: mapping, keyed by the plugin's dashed name, e.g. avlite-bridge-carla.

Testing

Install dev dependencies and run the default fast suite (excludes slow and data-dependent tests):

pip install -e ".[dev]"
pytest

Run the full suite including slow timing tests and repo data/ regressions:

pytest -m ""

Run with coverage (advisory, no threshold enforced):

pytest --cov=avlite --cov-report=term-missing

Tests mirror the package layout under test/. Synthetic fixtures live in test/fixtures/ so CI does not depend on large map assets. Markers: slow for timing-sensitive tests, requires_data for Yas Marina and similar repo data checks.

Developing Custom Plugins

See the Plugin Development Guide for detailed instructions on creating custom perception, planning, and control components.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avlite-0.4.0.tar.gz (188.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avlite-0.4.0-py3-none-any.whl (214.4 kB view details)

Uploaded Python 3

File details

Details for the file avlite-0.4.0.tar.gz.

File metadata

  • Download URL: avlite-0.4.0.tar.gz
  • Upload date:
  • Size: 188.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for avlite-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7ec8ddea2d7a2f7a73565c3f222b4b5e2457095f47cc0d3a4805fde4b7bd43df
MD5 6f79907ca6868af8782c7a348995b534
BLAKE2b-256 a72621f874f9e1eb48c842f364fbb8fcec948faf40b9b9627283441fcacf6ba4

See more details on using hashes here.

Provenance

The following attestation bundles were made for avlite-0.4.0.tar.gz:

Publisher: publish.yml on AV-Lab/avlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file avlite-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: avlite-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 214.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for avlite-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85aa4b4e160654364dc5f46cfd0ed7f530a5faecea06b51ec0f31b4e6ccfec80
MD5 e72e7f677d3471d909f2181ea4c30c10
BLAKE2b-256 86c2f2b25b972a10563846a3d42bfa6f3d519b1efc7a49f6b170d3d90a807434

See more details on using hashes here.

Provenance

The following attestation bundles were made for avlite-0.4.0-py3-none-any.whl:

Publisher: publish.yml on AV-Lab/avlite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page