- Be in the root of the repo
./imaging_tests.sh
-
Be in the root of the repo
-
python3 -m unittest tests/path-to-test/thingy_test.py
e.g.
python3 -m unittest tests/imgaging/integ_tests.py
- 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. If you're on an non-linux OS you can also just comment out the lines for mounting the X socket and uncomment the lines for the "desktop-lite" below. Then by going to
localhost:6080
and entering the passwordvscode
you should be able to access a desktop environment through your browser if necessary. - 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 .
-
cd into the
siyi_sdk
submodule andpip install -e .
. If the folder is empty, dogit submodule init && git submodule update
Do this AFTER doing pip install -e .
If you do that after, it'll overwrite the jetson-specific packages.
-
Download the torch 2.1.0 wheel from here https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 and pip install it (e.g.
pip install torch-2.1..0-cp<blahblah>.whl
) -
Build torchvision from source.
sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev
git clone --branch v0.16.1 https://github.com/pytorch/vision torchvision
cd torchvision
export BUILD_VERSION=0.16.1
python3 setup.py install --user
- 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.
- go into
/home/ws
source install/setup.sh
colcon build --merge-install
ros2 run uavf_2024 imaging_node.py
(this starts the service)- from another terminal, run
ros2 service call /imaging_service uavf_2024/srv/TakePicture
pytorch: https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048 as of jan 23, the jetson is on Jetpack 6
cd /home/forge/ws/logs/bagfiles/rosbag2_2024_06_12-17_23_07 while true; do ros2 bag play rosbag2_2024_06_12-17_23_07.db3; done