Samples#

Warning

The samples data and precompiled samples binaries are not preinstalled on the NVIDIA® DRIVE® AGX Thor Target System. You must download them to the host system following the procedure in Downloading and Installing Additional DriveOS Packages in the NVIDIA DriveOS Installation Guide and install or mount them on the target system following the procedures in Getting Started.

Note

Third-party sensors and accessories noted on this page are for illustrative purposes. Please refer to NVIDIA DRIVE Hyperion™ 8.1 Sensors and Accessories for supported sensors and accessories.

The NVIDIA DriveWorks SDK includes samples that you can use as a starting point for developing, porting, and optimizing your applications. These samples are provided as source code that you can modify to meet specific use cases, such as the use of third-party sensors, custom rendering steps, etc.

You can use the as-delivered sample applications without compiling or loading them. If you installed the DriveWorks SDK on the target, those sample applications are ready to execute. If you need to build the samples from source, please refer to Getting Started.

The samples use included data files by default if no other file is specified at execution. These data files are short in length, and the default samples are not to be considered as thorough demonstrations.

Once installed, the precompiled samples can be found under

/usr/local/driveworks/bin

On the host system, once installed, source code can be found under

/usr/local/driveworks/samples/src

Note

If you experience a permissions error when entering the command to run a sample, re-enter the command preceded with sudo. This generally happens when the sample tries to write an output file under /usr/local.

Common Options#

In addition to the parameters described in each sample’s documentation, the following options are also available:

--help#

Prints help information.

--autoExit=0|1[=0]#

Used for auto-exit function.

  • 0: Sample replays when reaching the end of the data stream.

  • 1: Sample auto exits when reaching the end of the data stream.

--offscreen=0|1|2[=0]#

Allows to disable rendering.

  • 0: Displays window.

  • 1: Displays offscreen window.

  • 2: No window created.

--profiling=0|1[=1]#

When set to 1, enables sample profiling. Otherwise, profiling is disabled.

Introductory Samples#

Sample

Description

Hello World Sample

Initializes the DriveWorks SDK context and accesses GPU properties.

Sensor Abstraction Layer Samples#

Camera Samples#

Sample

Description

Camera Sample

Displays and records a video setup utilizing the SIPL framework with custom cameras.

Camera Seek Sample

Demonstrates how to replay a video and seek to any point in the video.

USB Camera Capture Sample

Displays videos captured from generic USB cameras.

Other Sensor Samples#

Sample

Description

GPS Location Logger Sample

Displays messages from GPS devices.

GPS Plugin Sample

Implements a driver for a CAN-based GPS sensor.

IMU Logger Sample

Displays messages from IMU sensor.

IMU Plugin Sample

Implements a driver for a CAN-based IMU sensor.

Lidar Plugin Sample

Implements a driver for a UDP/TCP based lidar sensor.

Lidar Replay Sample

Displays the 3D point cloud from the lidar.

Radar Plugin Sample

Implements a driver for a UDP/TCP based radar sensor.

Radar Replay Sample

Connects to a radar and displays the generated 3D point cloud.

Sensor Enumeration Sample

Enumerates all available sensors drivers in the SDK.

Time Sensor Sample

Performs time synchronization on lidar data.

Vehicle and Motion Actuation Samples#

Sample

Description

Dataspeed Bridge Sample

Demonstrates how to convert CAN signals sent and received from a dataspeed drive-by-wire system, to a generic NVIDIA-defined CAN bus format.

Egomotion Sample

Uses steering angle and velocity CAN measurements to compute the position of the car in the world coordinate system.

Rig Configuration Sample

Reads the rig configuration from XML file.

VehicleIO Sample

Controls the vehicle (steering/throttle/brakes) and reads the vehicle’s state.

VehicleIO Plugin Sample

Demonstrates how to write a fully customized drive-by-wire abstraction.

Image Processing Samples#

Sample

Description

Camera Color Correction Sample

Demonstrates H.264 video playback with color correction.

Connected Components Sample

Demonstrates the connected components labeling algorithm.

Feature Tracker Sample

Demonstrates feature detection and feature tracking capabilities using the Feature Tracker module.

Image Capture Sample

Demonstrates how to record a video from a CUDA® image or a rendering video.

Image Transformation Sample

Demonstrates basic image processing functionalities.

Simple Image Streamer Sample

Demonstrates how to use an image streamer in a simple environment.

Stereo Disparity Sample

Demonstrates the stereo pipeline, and how to produce a confidence map and final stereo output.

Template Tracker Sample

Demonstrates template tracking capabilities using the Tracking

Video Rectification Sample

Removes fisheye distortion from a video captured on a camera with a fisheye lens using the DriveWorks SDK CUDA implementation.

Video Rectification with LDC Sample

Removes fisheye distortion from a video captured on a camera with a fisheye lens using NvMedia LDC.

Point Cloud Processing Samples#

Sample

Description

Iterative Closest Points (ICP) Sample

Displays a composite image of sequential ICP transforms derived from lidar data.

Point Cloud Processing Sample

Demonstrates how to use point cloud processing APIs for primitive processing.

Calibration Samples#

Sample

Description

Camera Calibration Sample

Demonstrates the ability to estimate camera extrinsics using the DriveWorks SDK Calibration Engine.

IMU Calibration Sample

Demonstrates the ability to estimate IMU extrinsics using the DriveWorks SDK Calibration Engine.

Lidar Calibration Sample

Demonstrates the ability to estimate lidar extrinsics using the DriveWorks SDK Calibration Engine.

Radar Calibration Sample

Demonstrates the ability to estimate radar extrinsics using the DriveWorks SDK Calibration Engine.

Stereo Calibration Sample

Demonstrates the ability to estimate stereo extrinsics using the DriveWorks SDK Calibration Engine.

Communication Samples#

Sample

Description

Inter-Process Communication (IPC) Sample

Demonstrates simple IPC functionalities using network sockets.

Utility Samples#

Sample

Description

Rendering Sample

Demonstrates rendering helpers which help render text, points, lines, triangles, and textures in 2D and 3D for debug visualization.

Rendering Engine Sample

Demonstrates how to draw points, lines, triangles, ellipses, boxes, arrows, plots, grids, and images in 2D and 3D.

Note

For detailed instructions on building the samples from source, please refer to Getting Started .