- Clone the repo
- In VSCode, open the command palette and run
rebuild and reopen in dev container
- To verify your setup, run
run_tests.sh
- 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,cd /home/ws/PX4-Autopilot
, then runmake px4_sitl gazebo-classic
. - 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.