- Ensure you have Docker and X-11 forwarding installed on your device (google this)
- Clone the repo and edit devcontainer.json accordingly for your X-11 setup
- In VSCode, first run
python3 setup_image.py
(alternatively runecho "FROM t0mmyn/uavf_2024" > .devcontainer/Dockerfile
to download from a mirrored x86 image) - Then open the command palette (cmd/ctrl+shift+p) and run
rebuild and reopen in dev container
- To verify your setup, run
run_tests.sh
- Open VScode to the repo
- Open the command palette (cmd/ctrl+shift+p) and run
rebuild and reopen in dev container
- Refer to
sim_instructions.md
for instructions on starting and running the simulation.
-
cd into this repo's root directory.
-
Run:
pip install -e .
- Open this project in vscode
- Install the "Dev Containers" extension
- Open the command pallete (ctrl-shift-p), then search for and execute "Dev Containers: (Re-)build and Reopen in Container"
- Congratulations, you get to skip all those tedious steps to install ROS 2 manually, and your environment is isolated from the rest of your computer
- To make downloading dependencies reproducible, add any important software installation steps to the Dockerfile in this repo.
- To use git inside the docker container, you may have to manually log in to GitHub again if the built-in credential forwarding isn't working. I recommend using the GitHub CLI to do this.
- If you want to use the simulator:
- Follow instructions in
sim_instructions.md
. - If you want it to run it in a GUI, one way is using the remote desktop environment in the dev container. Open
localhost:6080
in a web browser, then enter passwordvscode
, then use the menu in the bottom left to open a terminal. - The X sockets should also be mounted and should work if you run
xhost +
on your machine.
- Follow instructions in
I copied a lot of the config from this tutorial: https://docs.ros.org/en/foxy/How-To-Guides/Setup-ROS-2-with-VSCode-and-Docker-Container.html
(WIP). It's recommended to use the Dockerfile for development.