DriveWorks SDK Reference
5.6.215 Release
For Test and Development only

Samples

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 DriveWorks on the target, those sample applications are ready to execute. If you need to build the samples from source, please refer to Building DriveWorks Samples.

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.

Precompiled samples can be found under:

/usr/local/driveworks/bin

The 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.

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

--offscreen=[0|1]
        Allows to disable rendering.
        Default value: 0

--profiling=[0|1]
        When set to 1, enables sample profiling.
        Otherwise, profiling is disabled.
        Default value: 1

Introductory Samples

Sample Description
Hello World Sample Initializes the DriveWorks SDK context and accesses GPU properties.

Sensor Abstraction Layer Samples

Camera Samples

Sample Description
USB Camera Capture Sample Displays videos captured from generic USB cameras.
Camera Sample Displays and records a video setup utilizing the SIPL framework with custom cameras.
Camera Replay Sample Uses a hardware decoder to playback and display an H.264 video stream.
Camera Seek Sample Demonstrates how to replay a video and seek to any point in the video.

Other Sensor Samples

Sample Description
Sensor Enumeration Sample Enumerates all available sensors drivers in the SDK.
CAN Message Interpreter Sample Uses a DBC interpreter to decode and display CAN messages.
CAN Message Logger Sample Displays messages from the CAN bus.
CAN Plugin Sample Implements a driver for a CAN-based CAN sensor.
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 Replay Sample Displays the 3D point cloud from the Lidar.
Lidar Plugin Sample Implements a driver for a UDP/TCP based LIDAR sensor.
Radar Replay Sample Connects to a Radar and displays the generated 3D point cloud.
Radar Plugin Sample Implements a driver for a UDP/TCP based RADAR sensor.
Simple Sensor Recording Sample Records data from CAN, GPS, Lidar, or Radar sensors.
Time Sensor Sample Performs time synchronization on lidar data.
Data Sensor Sample Reads time/socket data, printing timestamps and sizes for retrieved packets.

Vehicle and Motion Actuation Samples

Sample Description
Rig Configuration Sample Reads the rig configuration from the XML file produced by the DriveWorks Calibrated Graph to Rig File Tool tool.
Egomotion Sample Uses steering angle and velocity CAN measurements to compute the position of the car in the world coordinate system.
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.
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.

Image Processing Samples

Sample Description
Image Transformation Sample Demonstrates basic image processing functionalities.
Camera Color Correction Sample Demonstrates H.264 video playback with color correction.
Image Capture Sample Demonstrates how to record a video from a CUDA image or a rendering video.
Cross-Process Image Streamer Sample Demonstrates how to use an image streamer across multiple processes.
Multi-Thread Image Streamer Sample Demonstrates how to use an image streamer in a multi-thread environment.
Simple Image Streamer Sample Demonstrates how to use an image streamer in a simple environment.
Video Rectification Sample Removes fisheye distortion from a video captured on a camera with a fisheye lens using DW's CUDA implementation.
Video Rectification with LDC Sample Removes fisheye distortion from a video captured on a camera with a fisheye lens using NvMedia LDC.
Stereo Disparity Sample Demonstrates the stereo pipeline, and how to produce a confidence map and final stereo output.
Connected Components Sample Demonstrates the connected components labeling algorithm.
Feature Tracker Sample Demonstrates feature detection and feature tracking capabilities using the Features module.
FAST9 Feature Detector Sample Demonstrates feature detection capabilities using the FAST9 algorithm.
Template Tracker Sample Demonstrates template tracking capabilities using the Tracking module.
Structure from Motion (SFM) Sample Demonstrates triangulation by estimating a car pose from CAN data using the Egomotion module.

Point Cloud Processing Samples

Sample Description
Point Cloud Processing Sample Demonstrates how to use point cloud processing APIs for primitive processing.
ICP (Iterative Closest Points) Sample Displays a composite image of sequential ICP transforms derived from Lidar data.

Deep Neural Network (DNN) Framework Samples

Sample Description
DNN Plugin Sample Demonstrates DNN inference to classify a hand-written digit, using an MNIST model with a custom layer implemented as a plugin.
Basic Object Detector and Tracker Sample Demonstrates object detection and tracking for each frame in a video stream.
Basic Object Detector Using DNN Tensor Sample Demonstrates object detection using NVIDIA® TensorRT.

Calibration Samples

Sample Description
Camera Calibration Sample Demonstrates the ability to estimate camera extrinsics using the DriveWorks Calibration Engine.
IMU Calibration Sample Demonstrates the ability to estimate IMU extrinsics using the DriveWorks Calibration Engine.
Lidar Calibration Sample Demonstrates the ability to estimate Lidar extrinsics using the DriveWorks Calibration Engine.
Radar Calibration Sample Demonstrates the ability to estimate Radar extrinsics using the DriveWorks Calibration Engine.
Stereo Calibration Sample Demonstrates the ability to estimate Stereo extrinsics using the DriveWorks Calibration Engine.
Steering Calibration Sample Demonstrates the ability to estimate vehicle steering offset using the DriveWorks 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 With the NVIDIA DriveWorks SDK.