Skip to main content

A real-time PyQt dashboard visualizing vehicle dynamics and normal-force distribution.

Project description

logo

Force Fusion

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

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

force_fusion-0.0.7.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

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

force_fusion-0.0.7-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file force_fusion-0.0.7.tar.gz.

File metadata

  • Download URL: force_fusion-0.0.7.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for force_fusion-0.0.7.tar.gz
Algorithm Hash digest
SHA256 23b4401f9abb3ecf2082194e8e15e5f49acdf42145690f05e37813aebf4545c6
MD5 bbc405a15236c0bc454d418f7f08d9f7
BLAKE2b-256 6e83b616237a6bce3b2765a7fe44186025777934c211d547f62badd122d6b97c

See more details on using hashes here.

File details

Details for the file force_fusion-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for force_fusion-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f3ba44935af91ffd101f0d022506691a93a5aebfcf5138fed22cd98500125218
MD5 80da98e1c25cdff813c29cfc8d7dc95e
BLAKE2b-256 0d54e6e92a6ae24b64cba10ee9428946a9849cf23b7617ce3c699fe019ac0240

See more details on using hashes here.

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