DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

Getting Started Using the NVIDIA DRIVE SDK NGC Docker Container

Please refer to the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide" to download and install Docker, for complete host system requirements, for access to NVIDIA® GPU Cloud (NGC™), to pull the NVIDIA DRIVE® SDK build/flash Docker image from NGC, flash the NVIDIA DRIVE Orin™ system, setup minicom and networking for secure shell (SSH) and network file system (NFS), and for other important installation information.

Core Binaries Installation

We assume that you have pulled from NGC the NVIDIA DRIVE OS SDK Docker image named drive-agx-orin-linux-aarch64-sdk-build-x86 or drive-agx-orin-qnx-aarch64-sdk-build-x86 that may be used to build and flash the NVIDIA DRIVE OS SDK including the NVIDIA DriveWorks SDK and its sample applications. The NVIDIA DriveWorks SDK is precompiled and preinstalled for both the Linux x86 and Linux or QNX aarch64 architectures under the path /usr/local/driveworks inside the NVIDIA DRIVE OS SDK Docker container. The guest Docker container may also be used to flash the NVIDIA DRIVE Orin system following the procedure in the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide," in which case the NVIDIA DriveWorks SDK is precompiled and preinstalled for the Linux or QNX aarch64 architecture on the target system.

Guest Docker Container on Host System x86

Samples Binaries Installation

The NVIDIA DriveWorks SDK is precompiled and preinstalled for the Linux x86 architecture inside the NVIDIA DRIVE OS SDK Docker container under the path /usr/local/driveworks. The NVIDIA DriveWorks SDK samples are precompiled for the Linux x86 architecture and preinstalled under /usr/local/driveworks/bin.

Samples Compilation From Source

The NVIDIA DriveWorks SDK is precompiled and preinstalled for the Linux x86 architecture on the NVIDIA DRIVE OS SDK Docker image under the path /usr/local/driveworks to enable compiling samples and applications that leverage the NVIDIA DriveWork SDK. Source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are located under the path /usr/local/driveworks/samples.

To compile the samples, first start the guest Docker container with the following command on the host system:

% docker run -it -v /dev/bus/usb:/dev/bus/usb --gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-linux-aarch64-sdk-build-x86:6.0.3.0-0001

or

% docker run -it -v /dev/bus/usb:/dev/bus/usb --gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-qnx-aarch64-sdk-build-x86:6.0.3.0-0001
Note
Components of the Docker image name and the image tag may vary slightly from the above. Please use the name and tag provided to you by NVIDIA.
Warning
Enter all subsequent commands in this section at the guest Docker container command prompt #.

Create the output directory and configure the project:

# mkdir -p /home/nvidia/build-x86
# cmake -B /home/nvidia/build-x86 -DCMAKE_BUILD_TYPE=Release \
-S /usr/local/driveworks/samples

Console output:

-- The C compiler identification is GNU *
-- The CXX compiler identification is GNU *
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA *
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "*")
-- Found EGL: /usr/lib/x86_64-linux-gnu/libEGL.so
-- Found /usr/lib/x86_64-linux-gnu/libEGL.so:
-- - Includes: [/usr/include]
-- - Libraries: [/usr/lib/x86_64-linux-gnu/libEGL.so]
-- DW_EXPERIMENTAL_FORCE_EGL not set, EGL Support Disabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Default - Building with TRT version * and cudnn version *
-- Building GLFW for X11 (static)
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Driveworks Samples install dir: /home/nvidia/build-x86/install
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_base library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_base.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_calibration library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_calibration.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_egomotion library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_egomotion.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_imageprocessing library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_imageprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_pointcloudprocessing library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_pointcloudprocessing.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_sensors library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_sensors.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_vehicleio library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_vehicleio.so
-- Found 'dw/core/Version.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dw_dnn_base library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdw_dnn_base.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found driveworks_visualization library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdriveworks_visualization.so
-- Found 'dwvisualization/core/Visualization.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- optional driveworks_visualization_av library not found at /usr/local/driveworks/targets/x86_64-Linux/lib;/usr/local/driveworks/lib - ok
-- Found 'dw/core/DynamicMemory.h' in /usr/local/driveworks/targets/x86_64-Linux/include
-- Found dwdynamicmemory library in /usr/local/driveworks/targets/x86_64-Linux/lib/libdwdynamicmemory.so
-- Found cuDNN: /usr/include (found version "*")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvidia/build-x86

Build the project:

# cd /home/nvidia/build-x86
# make

Partial console output:

Scanning dependencies of target sample_hello_world
Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
Linking CXX executable sample_hello_world
Built target sample_hello_world

Install the project:

# make install

Partial console output:

Install the project...
-- Install configuration: "Release"
....
-- Installing: /home/nvidia/build-x86/install/bin/sample_hello_world
-- Set runtime path of "/home/nvidia/build-x86/install/bin/sample_hello_world" to ""

To run the "Hello World" sample, use the following command inside the guest Docker container:

# /home/nvidia/build-x86/install/bin/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path /home/nvidia/build-x86/install/bin may be run inside the guest Docker container in a similar way. For a full list of samples, please see Samples.

Documentation Installation

To install the NVIDIA DriveWorks SDK reference documentation into the guest NVIDIA DRIVE OS SDK Docker container, copy the following Debian packages to the location $DRIVEWORKS_WORKSPACE on the host system, where the environment variable $DRIVEWORKS_WORKSPACE denotes a folder on the host system that you will mount into the guest Docker container:

  • driveworks_doc-*_linux-amd64-ubuntu.deb
  • driveworks_cgf_doc-*_linux-amd64-ubuntu.deb

Then start the guest Docker container with the following command on the host system:

% docker run -it -v /dev/bus/usb:/dev/bus/usb -v $DRIVEWORKS_WORKSPACE:/home/nvidia \
--gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-linux-aarch64-sdk-build-x86:6.0.3.0-0001

or

% docker run -it -v /dev/bus/usb:/dev/bus/usb -v $DRIVEWORKS_WORKSPACE:/home/nvidia \
--gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-qnx-aarch64-sdk-build-x86:6.0.3.0-0001
Note
Components of the Docker image name and the image tag may vary slightly from the above. Please use the name and tag provided to you by NVIDIA.

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system of the mount into the guest Docker container that is mapped to the path /home/nvidia.

Warning
Enter all subsequent commands in this section at the guest Docker container command prompt #.

Install the driveworks_doc package:

# dpkg -i /home/nvidia/driveworks_doc-*_linux-amd64-ubuntu.deb

Console output:

Selecting previously unselected package driveworks_doc.
Preparing to unpack driveworks_doc-*_linux-amd64-ubuntu.deb ...
Unpacking driveworks_doc ...
Setting up driveworks_doc ...

Install the driveworks_cgf_doc package:

# dpkg -i /home/nvidia/driveworks_cgf_doc-*_linux-amd64-ubuntu.deb

Console output:

Selecting previously unselected package driveworks_cgf_doc.
Preparing to unpack driveworks_cgf_doc-*_linux-amd64-ubuntu.deb ...
Unpacking driveworks_cgf_doc ...
Setting up driveworks_cgf_doc ...

The NVIDIA DriveWorks SDK documentation is then installed under /usr/local/driveworks/doc in the guest Docker container.

Verification and Running the Samples

For instructions on verifying the file system layout and running the Linux x86 samples binaries from the guest NVIDIA DRIVE OS SDK Docker container on the host system, please see Verifying the NVIDIA DriveWorks SDK Installation .

NVIDIA DRIVE Orin Target System Linux aarch64

Samples Binaries Installation

We assume that you have flashed your NVIDIA DRIVE Orin target system using the NVIDIA DRIVE OS SDK Docker container and finalized your target system setup following the procedures in the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide." The NVIDIA DriveWorks SDK will be precompiled for the Linux aarch64 architecture and preinstalled on the target system under the path /usr/local/driveworks.

To install the NVIDIA DriveWorks SDK samples precompiled for the Linux aarch64 architecture onto the target system, copy the following Debian packages to the target system using the NFS mount that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide":

  • driveworks_data-*_drive-linux-*.deb
  • driveworks_samples-*_drive-linux-*.deb
  • driveworks_stm_samples-*_drive-linux-*.deb
  • driveworks_cgf_samples-*_drive-linux-*.deb
  • driveworks_doc-*_drive-linux-*.deb
  • driveworks_cgf_doc-*_drive-linux-*.deb
Warning
Enter all subsequent commands in this section at the target system command prompt $.

Connect to the target system using minicom or SSH, and then use dpkg to install the Debian packages in the following order using the following commands on the target system.

Install the driveworks_data package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_data-*_drive-linux-*.deb

The environment variable $NFS_MOUNT denotes the location on the target file system of the NFS mount.

Console output:

Selecting previously unselected package driveworks_data.
Preparing to unpack driveworks_data-*_drive-linux-*.deb ...
Unpacking driveworks_data ...
Setting up driveworks_data ...

Install the driveworks_samples package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_samples-*_drive-linux-*.deb

Console output:

Selecting previously unselected package driveworks_samples.
Preparing to unpack driveworks_samples-*_drive-linux-*.deb ...
Unpacking driveworks_samples ...
Setting up driveworks_samples ...

Install the driveworks_stm_samples package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_stm_samples-*_drive-linux-*.deb

Console output:

Selecting previously unselected package driveworks_stm_samples.
Preparing to unpack driveworks_stm_samples-*_drive-linux-*.deb ...
Unpacking driveworks_stm_samples ...
Setting up driveworks_stm_samples ...

Install the driveworks_cgf_samples package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_cgf_samples-*_drive-linux-*.deb

Console output:

Selecting previously unselected package driveworks_cgf_samples.
Preparing to unpack driveworks_cgf_samples-*_drive-linux-*.deb ...
Unpacking driveworks_cgf_samples ...
Setting up driveworks_cgf_samples ...

The NVIDIA DriveWorks SDK samples precompiled for the Linux aarch64 architecture are then installed under /usr/local/driveworks/bin on the target system.

Samples Cross-Compilation From Source

The NVIDIA DriveWorks SDK is precompiled and preinstalled for the Linux aarch64 architecture on the NVIDIA DRIVE OS SDK Docker image under the path /usr/local/driveworks/targets/aarch64-Linux to enable cross-compiling samples and applications that leverage the NVIDIA DriveWorks SDK. Source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are located under the path /usr/local/driveworks/samples.

To cross-compile the samples, first start the guest Docker container with the following command on the host system:

% docker run -it -v /dev/bus/usb:/dev/bus/usb -v $DRIVEWORKS_WORKSPACE:/home/nvidia \
--gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-linux-aarch64-sdk-build-x86:6.0.3.0-0001
Note
Components of the Docker image name and the image tag may vary slightly from the above. Please use the name and tag provided to you by NVIDIA.

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system below which you would like the cross-compiled sample binaries to be placed and is mapped to the path /home/nvidia inside the guest Docker container.

Warning
Enter all subsequent commands in this section at the guest Docker container command prompt #.

Create the output directory and configure the project:

# mkdir -p /home/nvidia/build-linux-aarch64
# cmake -B /home/nvidia/build-linux-aarch64 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5L.cmake \
-DVIBRANTE_PDK=/drive/drive-linux -S /usr/local/driveworks/samples

Console output:

-- VIBRANTE_PDK = /drive/drive-linux
-- VIBRANTE_PDK_BRANCH = *
-- Vibrante version *
-- VIBRANTE_PDK = /drive/drive-linux
-- Vibrante version *
-- The C compiler identification is GNU *
-- The CXX compiler identification is GNU *
-- Check for working C compiler: /drive/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-gcc
-- Check for working C compiler: /drive/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /drive/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-g++
-- Check for working CXX compiler: /drive/toolchains/aarch64--glibc--stable-*/bin/aarch64-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA *
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "*")
-- Found EGL: /drive/drive-linux/lib-target/libEGL.so
-- Found /drive/drive-linux/lib-target/libEGL.so:
-- - Includes: [/drive/drive-linux/include]
-- - Libraries: [/drive/drive-linux/lib-target/libEGL.so]
-- Found: /drive/drive-linux/lib-target/libdrm.so
-- Header at: /drive/drive-linux/include
-- DW_EXPERIMENTAL_FORCE_EGL set and EGL Support Enabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Cross Compiling for Vibrante
-- Default - Building with TRT version * and cudnn version *
-- Building GLFW for X11 (static)
-- Found X11: /drive/drive-linux/include
-- Looking for XOpenDisplay in /drive/drive-linux/lib-target/libX11.so;/drive/drive-linux/lib-target/libXext.so
-- Looking for XOpenDisplay in /drive/drive-linux/lib-target/libX11.so;/drive/drive-linux/lib-target/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- VIBRANTE_PDK_BRANCH = *
-- Found vibrante lib: /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante/lib/libudev.so
-- Found vibrante lib: /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante/lib/libusb-1.0.so
-- Found vibrante_Xlib: /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/samples/3rdparty/linux-aarch64/vibrante_Xlibs/lib/libXcursor.so
-- Driveworks Samples install dir: /home/nvidia/build-linux-aarch64/install
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_base library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_base.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_calibration library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_calibration.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_egomotion library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_egomotion.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_imageprocessing library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_imageprocessing.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_pointcloudprocessing library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_pointcloudprocessing.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_sensors library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_sensors.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_vehicleio library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_vehicleio.so
-- Found 'dw/core/Version.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dw_dnn_base library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdw_dnn_base.so
-- Found 'dwvisualization/core/Visualization.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found driveworks_visualization library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdriveworks_visualization.so
-- Found 'dwvisualization/core/Visualization.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- optional driveworks_visualization_av library not found at /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib;/drive/drive-linux/filesystem/targetfs/usr/local/driveworks/lib - ok
-- Found 'dw/core/DynamicMemory.h' in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/include
-- Found dwdynamicmemory library in /drive/drive-linux/filesystem/targetfs/usr/local/driveworks/targets/aarch64-Linux/lib/libdwdynamicmemory.so
-- Found cuDNN: /usr/include/aarch64-linux-gnu (found version "*")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvidia/build-linux-aarch64

Build the project:

# cd /home/nvidia/build-aarch64
# make

Partial console output:

Scanning dependencies of target sample_hello_world
Building CXX object src/hello_world/CMakeFiles/sample_hello_world.dir/main.cpp.o
Linking CXX executable sample_hello_world
Built target sample_hello_world

You may ignore warnings about missing library dependencies during linking, since those dependencies will be available on the target system.

Install the project:

# make install

Partial console output:

Install the project...
-- Install configuration: "Release"
....
-- Installing: /home/nvidia/build-linux-aarch64/install/bin/sample_hello_world
-- Set runtime path of "/home/nvidia/build-linux-aarch64/install/bin/sample_hello_world" to ""

Exit the guest Docker container and copy the contents of $DRIVEWORKS_WORKSPACE/build-linux-aarch64/install to the NVIDIA DRIVE Orin™ target system using the NFS mount that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide".

Warning
Enter all subsequent commands in this section at the target system command prompt $.

To run the "Hello World" sample, use the following command on the target system:

$ $NFS_MOUNT/sample_hello_world

The environment variable $NFS_MOUNT denotes the location on the target file system of the NFS mount.

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path $NFS_MOUNT may be run on the target system in a similar way. For a full list of samples, please see Samples.

Documentation Installation

To install the NVIDIA DriveWorks SDK reference documentation onto the target system, copy the following Debian packages to the target system using the NFS mount that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide":

  • driveworks_doc-*_drive-linux-*.deb
  • driveworks_cgf_doc-*_drive-linux-*.deb

Connect to the target system using minicom or SSH, and then use dpkg to install the Debian packages in the following order using the following commands on the target system.

Install the driveworks_doc package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_doc-*_drive-linux-*.deb

Console output:

Selecting previously unselected package driveworks_doc.
Preparing to unpack driveworks_doc-*_drive-linux-*.deb ...
Unpacking driveworks_doc ...
Setting up driveworks_doc ...

Install the driveworks_cgf_doc package:

$ sudo dpkg -i $NFS_MOUNT/driveworks_cgf_doc-*_drive-linux-*.deb

Console output:

Selecting previously unselected package driveworks_cgf_doc.
Preparing to unpack driveworks_cgf_doc-*_drive-linux-* ...
Unpacking driveworks_cgf_doc ...
Setting up driveworks_cgf_doc ...

The NVIDIA DriveWorks SDK documentation is then installed under /usr/local/driveworks/doc on the target system.

Verification and Running the Samples

For instructions on verifying the file system layout and running the Linux aarch64 samples binaries on the NVIDIA DRIVE Orin target system, please see Verifying the NVIDIA DriveWorks SDK Installation .

NVIDIA DRIVE Orin Target System QNX aarch64

Samples Binaries Installation

We assume that you have flashed your NVIDIA DRIVE Orin target system using the NVIDIA DRIVE OS SDK Docker container and finalized your target system setup following the procedures in the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide." The NVIDIA DriveWorks SDK will be precompiled for the aarch64 architecture and preinstalled on the target system under the path /usr/local/driveworks.

To install the NVIDIA DriveWorks SDK samples precompiled for the QNX aarch64 architecture onto the target system, unpack the following archives to the target system using the NFS mount that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide":

  • driveworks_data-*_drive-qnx-*.tar.gz
  • driveworks_samples-*_drive-qnx-*.tar.gz
  • driveworks_stm_samples-*_drive-qnx-*.tar.gz
  • driveworks_cgf_samples-*_drive-qnx-*.tar.gz

Unpack these archives into the mount location on the host:

% sudo tar -xzf driveworks_data-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH
% sudo tar -xzf driveworks_samples-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH
% sudo tar -xzf driveworks_stm_samples-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH
% sudo tar -xzf driveworks_cgf_samples-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH

The environment variable $HOST_MOUNT_PATH is the host path that you have exported via NFS and mounted on the target for providing target access the unpacked samples.

The NVIDIA DriveWorks SDK samples precompiled for the QNX arch64 architecture will be available under $NFS_MOUNT/usr/local/driveworks-*/bin on the target system, where $NFS_MOUNT is the path on the target to the NFS mounted location where you unpacked the samples.

Samples Cross-Compilation From Source

The NVIDIA DriveWorks SDK is precompiled and preinstalled for the QNX aarch64 architecture on the NVIDIA DRIVE OS SDK Docker image under the path /usr/local/driveworks/targets/aarch64-QNX to enable cross-compiling samples and applications that leverage the NVIDIA DriveWorks SDK. Source code and CMake project and toolchain files for the NVIDIA DriveWorks SDK samples are located under the path /usr/local/driveworks/samples.

To cross-compile the samples, first start the guest Docker container with the following command on the host system:

% docker run -it -v /dev/bus/usb:/dev/bus/usb -v $DRIVEWORKS_WORKSPACE:/home/nvidia \
-v $HOME/.qnx:/root/.qnx -v $QNX_BASE:/sdp -e QNX_BASE=/sdp -e QNX_HOST=/sdp/host/linux/x86_64 \
-e QNX_TARGET=/sdp/target/qnx7 -e QNX_TOP=/drive/drive-qnx -e QNX_VERSION=7.1.0 \
-e CUDA_INSTALL_DIR=/usr/local/cuda-safe-11.4 -e CUDA_PATH=/usr/local/cuda-safe-11.4 -e QNX_SDK_PATH=/drive/drive-qnx/ \
-e TEGRA_TOP=/drive/drive-foundation -e PATH=/sdp/host/linux/x86_64/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
--gpus=all --privileged --net=host \
nvcr.io/drive/driveos-sdk/drive-agx-orin-qnx-aarch64-sdk-build-x86:6.0.3.0-0001
Note
Components of the Docker image name and the image tag may vary slightly from the above. Please use the name and tag provided to you by NVIDIA.

The environment variable $DRIVEWORKS_WORKSPACE denotes the location on the host file system below which you would like the cross-compiled sample binaries to be placed and is mapped to the path /home/nvidia inside the guest Docker container and the environment variable $QNX_BASE denotes the location on the host file system of the QNX Software Development Platform installation.

Warning
Enter all subsequent commands in this section at the guest Docker container command prompt #.

Create the output directory and configure the project:

# mkdir -p /home/nvidia/build-qnx-aarch64
# cmake -B /home/nvidia/build-qnx-aarch64 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/usr/local/driveworks/samples/cmake/Toolchain-V5Q.cmake \
-DCUDA_DIR=/usr/local/cuda-safe-11.4 \
-DVIBRANTE_PDK=/drive/drive-qnx -S /usr/local/driveworks/samples

Build the project:

# cd /home/nvidia/build-qnx-aarch64
# make

Install the project:

# make install

Exit the guest Docker container and copy the contents of $DRIVEWORKS_WORKSPACE/build-qnx-aarch64/install to the NVIDIA DRIVE Orin™ target system using the NFS mount at $HOST_MOUNT_PATH that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide".

Warning
Enter all subsequent commands in this section at the target system command prompt $.

To run the "Hello World" sample, use the following command on the target system:

$ $NFS_MOUNT/sample_hello_world

Partial console output:

*************************************************
Welcome to Driveworks SDK
....
Happy autonomous driving!

Other samples from within the path $NFS_MOUNT may be run on the target system in a similar way. For a full list of samples, please see Samples.

Documentation Installation

To install the NVIDIA DriveWorks SDK reference documentation onto the target system, unpack the following archive to the target system using the NFS mount that you set up using the "NVIDIA DRIVE SDK NGC Docker Container Installation Guide":

  • driveworks_doc-*_drive-qnx-*.tar.gz
  • driveworks_cgf_doc-*_drive-qnx-*.tar.gz

Unpack this archive into the mount location on the host:

% sudo tar -xzf driveworks_doc-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH
% sudo tar -xzf driveworks_cgf_doc-*_drive-qnx-*.tar.gz -C $HOST_MOUNT_PATH

The NVIDIA DriveWorks SDK documentation is then unpacked under $NFS_MOUNT/usr/local/driveworks-*/doc on the target system.

Verification and Running the Samples

For instructions on verifying the file system layout and running the QNX aarch64 samples binaries on the NVIDIA DRIVE Orin target system, please see Verifying the NVIDIA DriveWorks SDK Installation .