Car Bringup
This document describes the steps required to bring up a new car for the first time after assembling the hardware.
These steps may have been completed for you
Prior to the FRI course, these steps have been completed for you, but are included here for completeness.
Flash the Orin
Using NVIDIA's SDK Manager, flash the Jetson Orin module with the appropriate JetPack version as described in the Jetson Orin Nano Flashing Guide.
Checkout the Workspace on the Car
The code for your car is organized into multiple repositories. The main workspace repository is roboracer_ws, which contains scripts to checkout, build, and run the various components. Note that while the roboracer_ws repository contains the main workspace structure, it does not contain any ROS packages; these are checked out separately using the checkout.sh script (run in a later step). In fact, the entire ~/roboracer_ws/src directory is initially empty and files in this folder should not be committed directly to the roboracer_ws repository. Folders in the src directory are managed separately as their own git repositories.
Note: Prior to using git on the car, ensure you have your SSH keys set up for GitHub access and Key Forwarding.
cd
git clone [email protected]:ut-av/roboracer_ws.git
Pull the latest changes from the main branch.
cd roboracer_ws/
git pull
Note: this public repository tracks an upstream repository: github.com/ut-amrl/roboracer_ws. For course developers: to pull updates from the upstream,
git remote add upstream [email protected]:ut-amrl/roboracer_ws.gitand thengit merge upstream/main.
Checkout the Code in the Workspace
cd roboracer_ws/
./scripts/checkout.sh
Build the Container
cd roboracer_ws/
./container build
Build the Workspace
cd roboracer_ws/
./container shell
make
Configure the camera with the Raspberry Pi Camera
sudo /opt/nvidia/jetson-io/jetson-io.py
For more details, see the camera setup instructions in Raspberry Pi Camera Setup.
Increasing Swap Space
The Jetson Orin Nano comes with limited RAM, and building the workspace may require more memory than is available.
To avoid out-of-memory errors during the build process, you may increase the swap space.
First check the current swap space size using the jtop command and looking for the "SWAP" line in the top left portion of the display.
If the swap space is less than 16G, increase it as follows:
sudo fallocate -l 16G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
sudo cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Troubleshooting
A variety of issues may arise on any robot. Please refer to the Troubleshooting Guide for common problems and solutions.