-
Notifications
You must be signed in to change notification settings - Fork 5
Setting up the repository
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.
Follow these steps to setup the project on your local machine:
-
Install the tools listed above. For Podman Desktop, follow these instructions for your OS, and ensure Podman is running before continuing.
-
Download the Dev Containers extension for VS Code.
-
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
-
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 rungit clone https://github.com/ut-ras/robomaster.git
in the directory of your choice.
- You can do this in VS Code by opening the command palette (F1), searching for "Git Clone", and entering
-
Open the new
robomaster
repository folder in VS Code. -
Click
Reopen in Container
when prompted, or findDev Containers: Reopen in Container
in the command palette (F1) to setup and launch the container. -
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 likescons: done building targets.
-
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 🎉 🎉
If you run into any issues along the way, feel free to reach out in the #firmware channel on Discord.