Skip to main content

LEADS: Lightweight Embedded Assisted Driving System

logo

LEADS only supports two drive-wheel configurations: single rear wheel (SRW) mode and dual rear wheel (DRW) mode.

This project aims to implement the following features:

  • A basic instrumentation system
  • A basic communication system
  • A basic control system
  • A data recording system with the following components
    • A speed recording system
    • A G force recording system
    • A GPS recording system
    • A battery voltage recording system
  • A control system with the following components
    • DTCS (Dynamic Traction Control System)
    • ABS (Anti-lock Braking System)
    • EBI (Emergency Braking Intervention)
    • ATBS (Automatic Trail Braking System)

The codes are never designed for average high school students to understand. You may find it hard to read the codes if you do not satisfy the following requirements of skills and knowledge.

  • Advanced Python knowledge (you should be familiar with everything and even programming philosophy in Python)
  • Solid knowledge of Physics (you should understand how a car moves in reality)
  • Basic embedded development experience (C/C++, Raspberry Pi, Arduino, serial communication, PWM)
  • Rich experience in Web development (React, NextJS, FastAPI, TCP/IP, sockets)
  • Basic machine learning knowledge (linear regression, polynomial regression)

Installation

Python

Note that LEADS requires Python >= 3.11.

pip install pysimplegui keyboard RPi.GPIO pyserial leads

numpy will be automatically installed with leads.

pysimplegui, keyboard, RPi.GPIO, and pyserial are optional.

If you need only the skeleton, run the following.

pip install leads

Verify

python -m leads_vec info

Arduino

You can install LEADS-Arduino from Arduino Library Manager. Note that it is named "LEADS", not "LEADS-Arduino", in the index.

Quickstart

Main

python -m leads_vec run

Optional Arguments

Run the following to get a list of all the supported arguments.

python -m leads_vec -h
Specify a Configuration File
python -m leads_vec -c path/to/the/config/file.json run

If not specified, all configurations will be default values.

To learn about the configuration file, read Configurations.

Generate a Configuration File
python -m leads_vec -r config run

This will generate a default "config.json" file under the current directory.

Register as a Systemd Service
python -m leads_vec -r systemd run

This will register a system service to start the program.

To enable auto-start at boot, run the following.

systemctl daemon-reload
systemctl enable leads_vec

Remote Controller

python -m leads_vec_rc

Go to the online dashboard https://leads-vec-rc.projectneura.org.

Register as a Systemd Service

python -m leads_vec_rc -r systemd

This will register a system service to start the program.

To enable auto-start at boot, run the following.

systemctl daemon-reload
systemctl enable leads_vec_rc

Configurations

The configuration is a json file that has the following columns. You can have an empty configuration file like the following as all the columns are optional.

{}

Note that a purely empty file could cause error.

Type Usage Used By Default
srw_mode bool True: single rear wheel; False: dual rear wheel Main, Remote True
width int Window width Main 720
height int Window height Main 480
fullscreen bool True: auto maximize; False: window mode Main False
no_title_bar bool True: no title bar; False: default title bar Main False
manual_mode bool True: hide control system; False: show control system Main False
refresh_rate int GUI frame per second Main 30
font_size_small int Small font size Main 8
font_size_medium int Medium font size Main 16
font_size_large int Large font size Main 32
font_size_x_large int Extra large font size Main 48
scaling_factor float A factor used to scale every component Main 1
comm_addr str Communication server address Remote "127.0.0.1"
comm_port int The port on which the communication system runs on Main, Remote 16900
data_dir str The directory for the data recording system Remote "./data"
enable_data_persistence bool True: enable data persistence; False: disable data persistence Remote True

Submodules

Full Docs

Besides the docs on GitHub, we also host our docs on Read the Docs (TBC).

Periodic Report

See reports.

Architecture

Main

Pin Configuration

pin-config

Remote Controller

comm-flowchart

Collaborations

Community

Issues

Our team management completely relies on GitHub. Tasks are published and assigned as issues. You will be notified if you are assigned to certain tasks. However, you may also join other discussions for which you are not responsible.

There are a few labels that classify the issues.

  • bug reports a bug
  • code review discusses a code review or comment
  • documentation suggests a documentation enhancement
  • duplicate marks that a similar issue has been raised
  • enhancement proposes a new feature or request
  • help wanted means that extra attention is needed to this issue
  • invalid marks that the issue is in a valid format
  • question requests further information
  • report starts a periodic report discussion
  • todo creates a new task
  • wontfix marks that the issue is ignored

Label your issue with at least one of the labels above before you submit.

Projects

You can have a look at the whole schedule of each project in a timeline using the projects feature.

Code Contributions

See CONTRIBUTING.md.

Metadata

Release files for leads 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leads 0.3.1
File Size Uploaded
leads-0.3.1.tar.gz 28.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for leads 0.3.1
File Interpreter ABI Platform
leads-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 66.9 kB

Release files / leads-0.3.1.tar.gz

Download URL leads-0.3.1.tar.gz
Size 28.6 kB
Tags Source
SHA-256 checksum
How to use checksums
982c69344d1322c7e5e32acc37d9b507c2d9c29a72296ef2a459726641d22cc2
BLAKE2b-256 checksum
How to use checksums
6badc373a6aadafecd24c3dd4c7954f6f4e42af126f0d04b387b5fa7170903f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / leads-0.3.1-py3-none-any.whl

Download URL leads-0.3.1-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79e168d76530eb503edadf108a5635a3ec2be3730480500529b996301dae417e
BLAKE2b-256 checksum
How to use checksums
7a7539fddb9119068e62d6bd8dac7618fb3308d8ecb4ad9df0627b81572dc4c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.34

2 release files

0.8.33

2 release files

0.8.32

2 release files

0.8.31

2 release files

0.8.30

2 release files

0.8.29

2 release files

0.8.28

2 release files

0.8.27

2 release files

0.8.26

2 release files

0.8.25

2 release files

0.8.22

2 release files

0.8.21

2 release files

0.8.20

2 release files

0.8.19

2 release files

0.8.18

2 release files

0.8.17

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page