Skip to main content
logo

Force Fusion

Ask DeepWiki PyPI License uv Ruff Downloads Last Commit
A real-time PyQt dashboard visualizing vehicle dynamics and normal-force distribution.

#Vehicle Dynamics   #Normal-force Estimation   #PyQt   #3D Visualization


▶️ Watch Demo Video

🚀 Getting Started

It is recommended to use uv to create a virtual environment and pip install the following package.

pip install force-fusion

To run the application, simply type:

force-fusion
# or
force-fusion --help

👨‍💻 Development Setup

  1. Clone the repository and navigate to project folder:

    git clone https://github.com/Sang-Buster/Force-Fusion
    cd Force-Fusion
    
  2. Install uv first:

    # macOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # Windows
    powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  3. Create a virtual environment at Force-Fusion/.venv/:

    uv venv --python 3.10
    
  4. Activate the virtual environment:

    # macOS/Linux
    source .venv/bin/activate
    
    # Windows
    .venv\Scripts\activate
    
  5. Install the required packages:

    uv pip install -e .
    
  6. Set up environment variables:

    # Copy the example environment file
    cp .env.example .env
    
    • You can get a MAPBOX_TOKEN by signing up at https://www.mapbox.com/
    • Update the CSV_PATH if you want to use a custom database file
    • Update the WS_HOST if you want to use a custom websocket host
    • Update the WS_PORT if you want to use a custom websocket port
    • Update the WS_RECONNECT_INTERVAL if you want to use a custom websocket reconnect interval
    • Modify more variables in .env as needed
  7. Install ruff and pre-commit:

    uv pip install ruff pre-commit
    
    • ruff is a super fast Python linter and formatter.
    • pre-commit helps maintain code quality by running automated checks before commits are made.
  8. Install git hooks:

    pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
    

    These hooks perform different checks at various stages:

    • commit-msg: Ensures commit messages follow the conventional format
    • pre-commit: Runs Ruff linting and formatting checks before each commit
    • pre-push: Performs final validation before pushing to remote
  9. Code Linting:

    ruff check
    ruff check --fix
    ruff check --select I
    ruff check --select I --fix
    ruff format
    
  10. Run the application:

uv run src/force_fusion/app.py

📝 File Structure

📂Force-Fusion
 ┣ 📂src                         // Source Code
 ┃ ┗ 📦force_fusion                  // Python package
 ┃ ┃ ┣ 📂cli                             // Command Line Interface Directory
 ┃ ┃ ┃ ┣ 📄cli.py
 ┃ ┃ ┃ ┣ 📄env.py
 ┃ ┃ ┃ ┣ 📄test.py
 ┃ ┃ ┣ 📂resources                       // Static Resources Directory
 ┃ ┃ ┃ ┣ 📄car_back.svg
 ┃ ┃ ┃ ┣ 📄car_side.svg
 ┃ ┃ ┃ ┣ 📄demo.mp4
 ┃ ┃ ┃ ┣ 📄favicon.png
 ┃ ┃ ┃ ┗ 📄styles.qss
 ┃ ┃ ┣ 📂utils                           // Utility Directory
 ┃ ┃ ┃ ┣ 📄env_utils.py
 ┃ ┃ ┃ ┣ 📄geo_utils.py
 ┃ ┃ ┃ ┣ 📄test_utils.py
 ┃ ┃ ┃ ┣ 📄websocket_client_test.py
 ┃ ┃ ┃ ┗ 📄websocket_server.py
 ┃ ┃ ┣ 📂widgets                         // Widgets Directory  
 ┃ ┃ ┃ ┣ 📄attitude.py
 ┃ ┃ ┃ ┣ 📄gg_diagram.py
 ┃ ┃ ┃ ┣ 📄heading.py
 ┃ ┃ ┃ ┣ 📄mapbox_view.py
 ┃ ┃ ┃ ┣ 📄minimap.py
 ┃ ┃ ┃ ┣ 📄speedometer.py
 ┃ ┃ ┃ ┗ 📄tire_force.py
 ┃ ┃ ┣ 📄app.py
 ┃ ┃ ┣ 📄config.py
 ┃ ┃ ┣ 📄controller.py
 ┃ ┃ ┣ 📄sensors.py
 ┃ ┃ ┗ 📄ui_main_window.py
 ┣ 📄.env.example                // Template for environment variables
 ┣ 📄.gitignore                  // Git ignore patterns (env, cache, database)
 ┣ 📄.pre-commit-config.yaml     // Pre-commit hooks (ruff, commit message)
 ┣ 📄.pre-commit_msg_template.py // Commit message format validator
 ┣ 📄.python-version             // Python version
 ┣ 📄LICENSE                     // MIT License
 ┣ 📄README.md                   // Project documentation
 ┣ 📄pyproject.toml              // Project configuration
 ┗ 📄uv.lock                     // Lock file

Metadata

Release files for force-fusion 0.0.8

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

Source distribution (sdist)

Source distribution for force-fusion 0.0.8
File Size Uploaded
force_fusion-0.0.8.tar.gz 3.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for force-fusion 0.0.8
File Interpreter ABI Platform
force_fusion-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 MB

Release files / force_fusion-0.0.8.tar.gz

Download URL force_fusion-0.0.8.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
151b107cf9c760af7366a92e6fea0ee042e56dbf157b686ce64e0f140baedb73
BLAKE2b-256 checksum
How to use checksums
ddf7beb9bf15bcd6790495cea05de4ac0e439d3d08affccc74798f4cc622ca55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release files / force_fusion-0.0.8-py3-none-any.whl

Download URL force_fusion-0.0.8-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b4bb917b58926f1b5cf695ba55c11f6f122af08d4e1d411fbde3d5be68f63055
BLAKE2b-256 checksum
How to use checksums
d6af928d95cda467633b64879d3b96f75f986420113f14508fb2b490e4c1fe03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.3

Release history Release notifications | RSS feed

This release

0.0.8 This release

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