Skip to main content
Version: 7

MoveIt Pro ML on Jetson Devices

Required Version
This feature requires MoveIt Pro version 7.0 or newer.

The moveit_pro_ml package enables the use of machine learning models in MoveIt Pro behaviors. These ML behaviors can be run on higher end CPUs in a reasonable amount of time, but will not be performant on Jetson devices if the GPU isn't utilized.

Enabling a Jetson GPU with MoveIt Pro

For Nvidia tegra release 36 (Jetson 6.0, cat /etc/nv_tegra_release to see your release), the following dependencies are tested to work. For other releases of Tegra, you may have to find which versions of cudnn, cudnn-dev, onnxruntime, and l4t you need, and modify the below URLs accordingly. See here for information on different versions of jetpack.

Add the following lines to your user_ws Dockerfile in the user-overlay stage:

FROM base AS user-overlay
...
# get cudnn and cudnn-dev versions we need
RUN wget https://repo.download.nvidia.com/jetson/common/pool/main/c/cudnn/libcudnn8_8.9.4.25-1+cuda12.2_arm64.deb -q --show-progress --progress=dot:giga && \
sudo dpkg -i libcudnn8_8.9.4.25-1+cuda12.2_arm64.deb && \
rm libcudnn8_8.9.4.25-1+cuda12.2_arm64.deb

RUN wget https://repo.download.nvidia.com/jetson/common/pool/main/c/cudnn/libcudnn8-dev_8.9.4.25-1+cuda12.2_arm64.deb -q --show-progress --progress=dot:giga && \
sudo dpkg -i libcudnn8-dev_8.9.4.25-1+cuda12.2_arm64.deb && \
rm libcudnn8-dev_8.9.4.25-1+cuda12.2_arm64.deb

# get onnxruntime version we are using (compatible with all other deps in this dockerfile)
RUN wget -O onnxruntime_gpu-1.19.0-cp310-cp310-linux_aarch64.whl https://nvidia.box.com/shared/static/6l0u97rj80ifwkk8rqbzj1try89fk26z.whl -q --show-progress --progress=dot:giga && \
pip install onnxruntime_gpu-1.19.0-cp310-cp310-linux_aarch64.whl && \
rm onnxruntime_gpu-1.19.0-cp310-cp310-linux_aarch64.whl

# add l4t source
RUN echo "deb [trusted=yes] https://repo.download.nvidia.com/jetson/common r36.3 main\n\
deb [trusted=yes] https://repo.download.nvidia.com/jetson/t234 r36.3 main\n\
deb [trusted=yes] https://repo.download.nvidia.com/jetson/ffmpeg r36.3 main" \
> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list


# https://forums.balena.io/t/getting-linux-for-tegra-into-a-container-on-balena-os/179421/20
RUN mkdir -p /opt/nvidia/l4t-packages/ && \
touch /opt/nvidia/l4t-packages/.nv-l4t-disable-boot-fw-update-in-preinstall

RUN sudo apt-get update && sudo apt-get upgrade -yq && sudo apt-get install nvidia-l4t-core

# install cuda for jetson dependencies
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/arm64/cuda-ubuntu2204.pin -q --show-progress --progress=dot:giga
RUN sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
RUN wget https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda-tegra-repo-ubuntu2204-12-6-local_12.6.3-1_arm64.deb -q --show-progress --progress=dot:giga
RUN sudo dpkg -i cuda-tegra-repo-ubuntu2204-12-6-local_12.6.3-1_arm64.deb
RUN sudo cp /var/cuda-tegra-repo-ubuntu2204-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/
RUN sudo apt-get update
RUN sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install cuda-toolkit-12-6 cuda-compat-12-6
RUN rm cuda-tegra-repo-ubuntu2204-12-6-local_12.6.3-1_arm64.deb

RUN wget https://repo.download.nvidia.com/jetson/common/pool/main/t/tensorrt/libnvinfer8_8.6.2.3-1+cuda12.2_arm64.deb -q --show-progress --progress=dot:giga && \
sudo dpkg -i libnvinfer8_8.6.2.3-1+cuda12.2_arm64.deb && \
rm libnvinfer8_8.6.2.3-1+cuda12.2_arm64.deb

RUN wget https://repo.download.nvidia.com/jetson/common/pool/main/t/tensorrt/libnvinfer-plugin8_8.6.2.3-1+cuda12.2_arm64.deb -q --show-progress --progress=dot:giga && \
sudo dpkg -i libnvinfer-plugin8_8.6.2.3-1+cuda12.2_arm64.deb && \
rm libnvinfer-plugin8_8.6.2.3-1+cuda12.2_arm64.deb

RUN wget https://repo.download.nvidia.com/jetson/common/pool/main/t/tensorrt/libnvonnxparsers8_8.6.2.3-1+cuda12.2_arm64.deb -q --show-progress --progress=dot:giga && \
sudo dpkg -i libnvonnxparsers8_8.6.2.3-1+cuda12.2_arm64.deb && \
rm libnvonnxparsers8_8.6.2.3-1+cuda12.2_arm64.deb

Then rebuild Pro with moveit_pro build and your Jetson GPU should now be enabled.