First, clone the repository with submodules:
git clone --recurse-submodules https://github.com/NewcastleRacingAI/Newcastle-Racing.gitIf you have already cloned the repository, you can initialize the submodules with:
git submodule update --init --recursive --mergeIf you want to update the submodules to the latest commit on their respective branches, you can run:
git submodule update --remoteNote
If you have made changes to the submodules that you want to keep, stash them and pop them after updating the submodules. You may still run into some merge conflicts you will have to solve manually.
git stash
git submodule update --remote
git stash popNote
If you have made changes to the submodules that you DO NOT want to keep, reset them to the latest commit before updating the submodules.
git submodule foreach git reset --hard
git submodule update --remoteIf you want to make changes to the submodules, you can modify the source code in the submodule directory, commit the changes, and push them to the submodule's repository.
cd path/to/submodule # E.g., cd src/nrai_pathplanning
# Make sure you are on the correct branch
git switch -c fullstack
git add .
git commit -m "Your commit message"
git push # If push fails, try 'git push --set-upstream origin fullstack'- Python>=3.12
- uv
- Can be installed with pip globally
Recommended, although not mandatory: create a virtual environment.
python3 -m venv .venv
# Linux
source .venv/bin/activate
# Windows
.venv/Script/activateWe use uv to manage the dependencies. Therefore, you need uv installed, either globally or in the virtual environment:
pip install uvLastly, we can run the full script:
uv run main.py -h# On the Windows machine with the CarMaker instance
uv run main.py -m simulator-only -sh ip-of-the-linux-machine# On the Linux machine with the full stack (simulated)
uv run main.py -m nrai-only# Trying to debug only the controller and path planner (simulated)
# v: 10 => Debug ... 50 => Critical
# vn: Which nodes should be verbose. Can be more than one. All by default
uv run main.py -m nrai-only -v 10 -vn nrai_controller nrai_path_planner# On actual car
uv run main.py -m nrai-only --zed