This repository is part of the KITcar onboarding. You find the instructions for what to do with the repo in the wiki.
In order to complete the turtlerace-onboarding,
you need to have your own fork
of the repository.
Make sure to select your username for namespace.
For that, viewing this repo in your browser on GitLab, click on the "fork"-button in the top right
and follow the wizard.
Don't change the suggested name.
This will create the forked repository at https://git.kitcar-team.de/<your username>/KITcar-Turtlerace.
We recommend to work with the repository in combination with kitcar-ws.
Here are the instructions on how to achieve this setup.
-
Choose a directory where you want to place all of the files. A common place would be for example in a folder like
~/kitcar/. If you don’t know what this syntax means, read about it here or ask your favorite LLM). -
At KITcar, we use the
kitcar-wsrepository for development. This repository contains a template for ROS development and vscode-configuration. More importantly, it also provides a devcontainer. This devcontainer provides an environment where ROS 2 and all other dependencies are installed, facilitating development. To set up this devcontainer, follow the readme in kitcar-ws. You can skip thecolcon build --symlink-installstep because we don't need to build any of the standard projects. -
After following the instructions, you should have vscode open and connected to the devcontainer. In order to verify this, open a terminal in vscode and run the command
whoami. This should outputkitcar. If it outputs anything else, make sure that you opened the folder of thekitcar-wsrepository (and neither a sub-, nor a superfolder). Then, you should be able to open the command palette (CTRL+SHIFT+P) and search for Dev Containers: Open Workspace in Container. -
Now, we need to run more commands in a terminal inside vscode. First, run
cd ~/ws/srcto enter thesrc-directory, where all of the repositories reside. Here, we want to add the turtlerace-repo as well. You do this by runninggit clone https://git.kitcar-team.de/<your username>/KITcar-TurtleraceReplace
<your username>with your actual username. This will actually clone the fork that you created of the repository. -
From now on, you want to run all commands inside the turtlerace folder. To place your terminal into that folder, run
cd ~/ws/src/KITcar-Turtlerace(if you are confused about the folder your terminal is in at any point, you can always return to that folder by running the above command). Running commands like
colcon build --symlink-installin a different folder accidentally won't break anything. It will just build unnecessary packages, so there is no need to be afraid. -
Now you can run
colcon build --symlink-installto build the turtlerace packages. -
If it builds correctly, you can source the setup script for the packages by running
source ~/ws/src/KITcar-Turtlerace/install/setup.zshYou need to run this command in every new terminal so later commands know about the packages that the turtlerace provides.
-
If you don't want to have to run this command in each new terminal, you can run the following command once:
echo 'source ~/ws/src/KITcar-Turtlerace/install/setup.zsh' >> ~/.zshrcNow, the script will be sourced in each new terminal automatically.