SOAR-UWU / UWU-Blobfish

General repo for Underwater Unit 2024
6 stars 0 forks source link

Document sFTP, Jetson SDK Update & Docker Image deployment to Jetson #16

Open Interpause opened 10 months ago

Interpause commented 10 months ago

Might have to upgrade Jetson to Jetpack 6.0?

Interpause commented 10 months ago

How to check Jetpack version: cat /etc/nv_tegra_release. Gets L4T (some sorta firmware) version. Then compare to https://developer.nvidia.com/embedded/jetpack-archive for associated Jetpack version.

Interpause commented 10 months ago

Check https://developer.nvidia.com/embedded/jetpack-archive for all past Jetson SDK versions. i.e., supported boards, changelogs, supported features.

Interpause commented 10 months ago

Two approaches to production deployment:

Complete Image

build_base_image.sh is undocumented (documentation inside script also outdated) but is used by run_dev.sh to build the image. Using same arguments found in run_dev.sh, but with the platform (x86_64 or aarch64) prepended to the image key, and a custom prod layer appended to the key, can build production images. For example, isaac_ros_common/scripts/build_base_image.sh aarch64.ros2_humble.user.realsense.my-deps.prod ros-prod-image '' '' ''. The prod layer should change/remove the default Nvidia entrypoint (since it attempts to update package indexes, requiring internet & wasting time). It should also include the workspace files and build them so that Docker's CMD can be set to run the launch file immediately.

However, to build image, you need two Jetsons. The Jetson devkit is used to test & build the image, whereas the production Jetson NX is used in the submersible. After building the image, it is pushed to Docker Hub (using private repository), then pulled onto the submersible.

Will have to copy the arguments used in run_dev.sh for running the Docker image to ensure it works on the submersible. Good idea to put into some custom launch.sh script and update the arguments whenever run_dev.sh updates.

run_dev.sh

Use run_dev.sh on the Jetson too like in development. Will require internet access at first even if the image is already built before due to some particularity with the Nvidia Docker registry not allowing the image to be outdated.

Interpause commented 10 months ago

Proposed running methods. Since submersible is disconnected from laptop after initial setup, should use screen to run commands. Also, good idea to setup some form of persistence (restart dead nodes or restart entire launch file?). And maybe some physical button that restarts the launch file. In any case, it should not be a full restart because some steps require internet, which the submersible cannot access when disconnected.

Complete Image

Use the prebuilt & pre-compiled image via launch.sh crafted to alr have the correct Docker arguments.

run_dev.sh

Use run_dev.sh, colcon build, then run the launch file.

Interpause commented 10 months ago

Change power mode: https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/PlatformPowerAndPerformance/JetsonXavierNxSeriesAndJetsonAgxXavierSeries.html#power-mode-controls