Skip to content

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:

  1. Clone the roboracer_ws repository.
  2. Check out the package repositories with airfield subpackages checkout.

Airfield requires a workspace that has been migrated to it. Check for an airfield.yaml file and a packages/ folder in ~/roboracer_ws. If your machine has a src/ folder and a container script 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/simulator before 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

See Keeping a car up to date.

On another machine, in 3 steps:

  1. Run git pull to update the roboracer_ws repository.
  2. Run airfield subpackages pull to update all of the repositories in the packages folder. airfield subpackages status shows which ones have changes.
  3. 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:

  1. Run git pull to update the roboracer_ws repository.
  2. Run ./scripts/checkout.sh to update all of the repositories in the src folder.
  3. Rebuild the container if necessary using the ./container build command.
cd ~/roboracer_ws
git pull
./scripts/checkout.sh