<img src="logo/logo_basic.svg" alt="uppaal2jetracer logo" width="260px"/>

# uppaal2jetracer

[![License](https://img.shields.io/badge/LICENSE-MIT-green)](https://choosealicense.com/licenses/mit/)

[![JetRacer](https://img.shields.io/badge/Wiki-JetRacer_ROS_AI_Kit-89CA02)](https://www.waveshare.com/wiki/JetRacer_ROS_AI_Kit)

[![Manual](https://img.shields.io/badge/Manual-uppaal2jetracer-FFFFFF)](docs/u2j_manual.pdf)

[![PyDoc](https://img.shields.io/badge/Docs-Python-4B8BBE)](docs/_build/html/index.html)
[![JSDoc](https://img.shields.io/badge/Docs-JavaScript-F0DB4F)](docs/jsdoc/main_doc/index.html)

[![JSDocE1](https://img.shields.io/badge/Docs-JS_Homepage_Events-F0DB4F)](docs/jsdoc/events_doc/events_main_doc/index.html)
[![JSDocE2](https://img.shields.io/badge/Docs-JS_Project_Events-F0DB4F)](docs/jsdoc/events_doc/events_projects_doc/index.html)
[![JSDocE3](https://img.shields.io/badge/Docs-JS_Version_Events-F0DB4F)](docs/jsdoc/events_doc/events_versions_doc/index.html)
[![JSDocE4](https://img.shields.io/badge/Docs-JS_Setting_Events-F0DB4F)](docs/jsdoc/events_doc/events_settings_doc/index.html)

**uppaal2jetracer** bridges formal automata theory and robotic control by transforming timed
automata models from UPPAAL into executable control logic for real-time simulation on a JetRacer ROS
AI Kit. Designed for researchers, students, and developers, it enables the validation of verifiable
traffic scenarios and autonomous driving behaviors, fostering reliable testing environments for
advanced mobility solutions.

# Installation

To install and use **uppaal2jetracer**, Docker must be installed on your system. Follow the steps
below to set up.

---

## **1. Clone the Repository**

```bash
git  clone git@gitlab.kit.edu:unmsq/uppaal2jetracer.git
cd  uppaal2jetracer
```

## 2. Run the setup script

```bash
cd setup/scripts
```

- Windows (as Administrator):
  ```powershell
  .\setup.bat
  ```
- Linux/macOS:
  ```bash
  sudo chmod +x setup.sh
  sudo ./setup.sh
  ```

## 3. Choose Profile

- Open `setup/config.ini` in a text editor.
- Set `profile` under `[profiles]` to the desired profile
- Profiles:
    - jetracer: Used for the setup on the JetRacer. Do not use a different profile for the JetRacer
      ROS AI Kit!
    - minimal: Used for the minimal setup. No hardware dependencies.

## 4. Build the Docker Image

```bash
cd setup/scripts
```

- Windows:
  ```powershell
  .\build.bat
  ```
- Linux/macOS:
  ```bash
  sudo chmod +x build.sh
  ./build.sh
  ```
- Check if the build was successful:
  ```bash
  docker image list
  ```
  There should be a image named `uppaal2jetracer` now.

A detailed installation guide can be found in the [manual](docs/u2j_manual.pdf).

# Usage

Before running **uppaal2jetracer**, make sure to complete the build process by following the
installation instructions.

---

## Running uppaal2jetracer

```bash
cd setup/scripts
```

- Windows:
  ```powershell
  .\run.bat
  ```
- Linux/macOS:
  ```bash
  sudo chmod +x run.sh
  ./run.sh
  ```

A detailed usage guide can be found in the [manual](docs/u2j_manual.pdf).

# Contributing

Thank you for your interest in contributing to **uppaal2jetracer**!

At this time, we are not accepting external contributions while the project is under active
development and pending final grading as part of our PSE. We appreciate your understanding and
encourage you to check back after the project has been completed and reviewed.

In the meantime, feel free to explore the repository and provide feedback or suggestions by opening
an issue.