Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Newcastle Racing

Setup

First, clone the repository with submodules:

git clone --recurse-submodules https://github.com/NewcastleRacingAI/Newcastle-Racing.git

If you have already cloned the repository, you can initialize the submodules with:

git submodule update --init --recursive --merge

Working with submodules

Pulling

If you want to update the submodules to the latest commit on their respective branches, you can run:

git submodule update --remote

Note

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 pop

Note

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 --remote

Pushing

If 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'

Requirements

Use

Recommended, although not mandatory: create a virtual environment.

python3 -m venv .venv
# Linux
source .venv/bin/activate
# Windows
.venv/Script/activate

We use uv to manage the dependencies. Therefore, you need uv installed, either globally or in the virtual environment:

pip install uv

Lastly, we can run the full script:

uv run main.py -h

Example

# 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

About

No description or website provided.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages