Checking Out Platform Code
When you begin working on a new computer or robot, you will need to check out the platform code. On the F1TENTH cars, the setup script has already done this.
Project Organization
The platform code is open source and is available in the github.com/ut-av organization on GitHub. The repository is structured as follows:
roboracer_ws/
├── airfield.yaml lists the ROS 2 package repositories and their branches
├── packages/ each ROS 2 package, as its own git repository
├── plans/
├── scripts/
├── ...
Note that each ROS2 package has its own git repository in the packages directory. The Airfield page describes the rest.
There are 2 steps to acquire the code:
- Clone the roboracer_ws repository.
- Check out the package repositories with
airfield subpackages checkout.
Airfield requires a workspace that has been migrated to it. Check for an
airfield.yamlfile and apackages/folder in~/roboracer_ws. If your machine has asrc/folder and acontainerscript instead, it is still on the older layout; follow the instructions in the box at the end of this page.
Cloning the Repositories
SSH into the machine (car or lab computer), then clone the roboracer_ws repository into your home directory. It has to be at ~/roboracer_ws:
cd ~
git clone https://github.com/ut-av/roboracer_ws.git
Change directory to the ~/roboracer_ws directory that was just checked out, then check out the packages:
cd ~/roboracer_ws
airfield subpackages checkout
git -C packages/ut_automata submodule update --init --recursive
airfield subpackages checkout clones each repository listed in airfield.yaml into packages/, at the branch listed there. It skips any folder that already exists, so it's safe to run again. The last line downloads a small library that ut_automata includes as a git submodule.
Tip: the desktop simulator is a 2 GB download that the car never uses. To skip it on a car, run
mkdir -p packages/simulatorbefore the checkout.
Updating the Code
On an F1TENTH car, the setup script updates everything, and only where nothing can be lost:
sudo ~/ot_orin_ros2/scripts/bootstrap.sh --update
On another machine, in 3 steps:
- Run
git pullto update theroboracer_wsrepository. - Run
airfield subpackages pullto update all of the repositories in thepackagesfolder.airfield subpackages statusshows which ones have changes. - Rebuild with
scripts/build. See Building.
cd ~/roboracer_ws
git pull
airfield subpackages pull
scripts/build
On the older layout: checkout.sh
Clone the repository as above, then run the checkout script:
cd ~/roboracer_ws
./scripts/checkout.sh
Note: the checkout script is idempotent, meaning it can be run multiple times without any negative effects.
To update:
- Run
git pullto update theroboracer_wsrepository. - Run
./scripts/checkout.shto update all of the repositories in thesrcfolder. - Rebuild the container if necessary using the
./container buildcommand.
cd ~/roboracer_ws
git pull
./scripts/checkout.sh