Skip to content

Setting up the repository

Caleb edited this page Sep 30, 2024 · 4 revisions

Tools

The following tools will be needed for our project:

  • VS Code: a extensible code editor and IDE. This is where you will spend most of your time while working on the project. It has a ton of useful functionality built-in, and there is a large library of extensions which make our workflows easier.
  • Git: an open-source industry standard tool for version control. Git allows us to keep track of changes we make, handle conflicts when multiple people edit the same files, and organize our work into units called "branches".
  • Podman Desktop: an open-source container manager, similar to Docker. Containers allow us to package all of our project's dependencies into a neat little box and install them in one go. This saves you the hassle of having to manually install everything, and saves you from cluttering your system with various installations.

Note: VS Code is strongly preferred for consistency and ease-of-use; however, other IDEs like vim can be used if you prefer -- just keep in mind that they will require more work on your part to set up. Feel free to contact a firmware lead for help.

Steps

Follow these steps to setup the project on your local machine:

  1. Install the tools listed above. For Podman Desktop, follow these instructions for your OS, and ensure Podman is running before continuing.

  2. Download the Dev Containers extension for VS Code.

  3. Open the VS Code settings (Ctrl+Comma), and set the following:

    Option Value
    Dev Containers: Docker Path podman
    Dev Containers: Execute In WSL Disabled
    Dev Containers: Execute In WSLDistro podman-machine-default
  4. Clone the repository.

    • You can do this in VS Code by opening the command palette (F1), searching for "Git Clone", and entering https://github.com/ut-ras/robomaster.git for the URL. Alternatively, open a terminal and run git clone https://github.com/ut-ras/robomaster.git in the directory of your choice.
  5. Open the new robomaster repository folder in VS Code.

  6. Click Reopen in Container when prompted, or find Dev Containers: Reopen in Container in the command palette (F1) to setup and launch the container.

  7. Try building the project with Tasks: Run Build Task or (Ctrl+Shift+B). Select a robot type and wait for compilation to finish. If everything went well, you should see a message like scons: done building targets.

  8. When opening the project in the future, make sure Podman is running and use the Dev Container in VS Code.

Done! Everything is now set up and you're ready to start developing 🎉 🎉

Issues

If you run into any issues along the way, feel free to reach out in the #firmware channel on Discord.

Clone this wiki locally