-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in dynamic image creation for ARM64 (Apple Sillicon) (#36)
- Loading branch information
Showing
8 changed files
with
286 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Sourcing things | ||
echo 'source /opt/ros/humble/setup.bash' >> /root/.bashrc | ||
echo 'source /root/ros2_ws/install/setup.bash' >> /root/.bashrc | ||
|
||
echo "export PATH=/root/ros2_ws/src/ardupilot/Tools/autotest:$PATH" >> /root/.bashrc | ||
echo "export PATH=/usr/lib/ccache:$PATH" >> /root/.bashrc | ||
|
||
echo "export PATH=\"$PATH:$HOME/.local/bin\"" >> /root/.bashrc | ||
|
||
# So that the container doesn't close | ||
/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"cmake.configureOnOpen": false, | ||
"python.testing.unittestArgs": [ | ||
"-v", | ||
"-s", | ||
"./tests", | ||
"-p", | ||
"*test*.py" | ||
], | ||
"python.testing.pytestEnabled": false, | ||
"python.testing.unittestEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,50 @@ | ||
# UAV Forge's ROS2 package for GN&C and Aerial Imagery Object Detection. | ||
|
||
## Dev Container Setup | ||
1. Clone the repo | ||
2. In VSCode, open the command palette and run `rebuild and reopen in dev container` | ||
3. To verify your setup, run `run_tests.sh` | ||
|
||
## Usage | ||
|
||
1. Refer to `sim_instructions.md` for instructions on starting and running the simulation. | ||
|
||
|
||
## Install instructions | ||
|
||
### Install required and local Python libraries | ||
|
||
1. cd into this repo's root directory. | ||
|
||
2. Run: | ||
``` | ||
pip install -e . | ||
``` | ||
|
||
|
||
### Dev container | ||
|
||
1. Open this project in vscode | ||
2. Install the "Dev Containers" extension | ||
3. Open the command pallete (ctrl-shift-p), then search for and execute "Dev Containers: (Re-)build and Reopen in Container" | ||
4. 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 | ||
5. To make downloading dependencies reproducible, add any important software installation steps to the Dockerfile in this repo. | ||
6. 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](https://cli.github.com/) to do this. | ||
7. If you want to use the simulator: | ||
1. Follow instructions in `sim_instructions.md`. | ||
2. 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 password `vscode`, then use the menu in the bottom left to open a terminal, `cd /home/ws/PX4-Autopilot`, then run `make px4_sitl gazebo-classic`. | ||
3. The X sockets should also be mounted and should work if you run `xhost +` on your machine. | ||
|
||
|
||
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 | ||
|
||
|
||
### Manual | ||
|
||
(WIP). It's recommended to use the Dockerfile for development. | ||
# UAV Forge's ROS2 package for GN&C and Aerial Imagery Object Detection. | ||
|
||
## Dev Container Setup (one time setup) | ||
1. Ensure you have Docker and X-11 forwarding installed on your device (google this) | ||
2. Clone the repo and edit devcontainer.json accordingly for your X-11 setup | ||
3. In VSCode, first run `python3 setup_image.py` | ||
4. Then open the command palette (cmd/ctrl+shift+p) and run `rebuild and reopen in dev container` | ||
5. To verify your setup, run `run_tests.sh` | ||
|
||
## Dev Container Usage | ||
1. Open VScode to the repo | ||
2. Open the command palette (cmd/ctrl+shift+p) and run `rebuild and reopen in dev container` | ||
|
||
## Sim Usage | ||
|
||
1. Refer to `sim_instructions.md` for instructions on starting and running the simulation. | ||
|
||
|
||
## Install instructions | ||
|
||
### Install required and local Python libraries | ||
|
||
1. cd into this repo's root directory. | ||
|
||
2. Run: | ||
``` | ||
pip install -e . | ||
``` | ||
|
||
|
||
### Dev container | ||
|
||
1. Open this project in vscode | ||
2. Install the "Dev Containers" extension | ||
3. Open the command pallete (ctrl-shift-p), then search for and execute "Dev Containers: (Re-)build and Reopen in Container" | ||
4. 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 | ||
5. To make downloading dependencies reproducible, add any important software installation steps to the Dockerfile in this repo. | ||
6. 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](https://cli.github.com/) to do this. | ||
7. If you want to use the simulator: | ||
1. Follow instructions in `sim_instructions.md`. | ||
2. 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 password `vscode`, then use the menu in the bottom left to open a terminal, `cd /home/ws/PX4-Autopilot`, then run `make px4_sitl gazebo-classic`. | ||
3. The X sockets should also be mounted and should work if you run `xhost +` on your machine. | ||
|
||
|
||
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 | ||
|
||
|
||
### Manual | ||
|
||
(WIP). It's recommended to use the Dockerfile for development. |
Oops, something went wrong.