DriveWorks SDK Reference
3.5.78 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.
Camera Server Client Camera Capture Sample Displays input from the first camera within the selected camera group on a specific port.
Camera Server Client with Raw Data Capture Sample Displays the raw input from the first camera within the selected camera group on a specific port.

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.
Radar Replay Sample Connects to a Radar and displays the generated 3D point cloud.
Simple Sensor Recording Sample Records data from CAN, GPS, Lidar, or Radar sensors.
Time Sensor Sample Performs time synchronization on lidar data

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.
Stereo Disparity Sample Demonstrates the stereo pipeline, and how to produce a confidence map and final stereo output.
Stereo Disparity PVA Sample Demonstrates the stereo pipeline running on multiple hardware engines.
Connected Components Sample Demonstrates the connected components labeling algorithm.
Image Pyramid PVA Sample Demonstrates the image pyramid creation pipeline on Programmable Vision Accelerator.
Dense Optical Flow Sample Demonstrates how to estimate motion vectors across different hardware units.
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.

Perception Samples

Sample Description
Obstacle Detection Sample (DriveNet) Demonstrates 2D object tracking with Features.
Freespace Detection Sample (OpenRoadNet) Demonstrates the detection from collision-free space in the road scenario.
Regressor-based Landmark Detection Sample (MapNet) Demonstrates landmark detection with MapNet regressor net.
Segmentation-based Landmark Detection Sample (MapNet) Demonstrates landmark detection on the road with MapNet.
Parking Space Detection Sample Demonstrates parking space detection with ParkNet DNN.
Path Perception Sample (PathNet) Demonstrates ego-path, as well as left and right adjacent paths detection.
PilotNet Sample Demonstrates prediction of paths for maneuvers in world space coordinates.
Road Mark Classification Sample Demonstrates classification of road markings on the road with RoadMarkNet.
Traffic Light Classification Sample (LightNet) Demonstrates detection of traffic lights facing the ego car.
Intersection Detection Sample (WaitNet) Demonstrates detection of intersections using WaitNet.
Traffic Sign Classification Sample (SignNet) Demonstrates detection of traffic signs facing the ego car.
Camera Blindness Detection Sample (ClearSightNet) Demonstrates DNN inference on live camera feed or H.264 videos, evaluating each frame to detect blindness.
LightSourcePerception Sample (LightSourceNet) Demonstrates DNN inference on live camera feed or H.264 videos, deciding whether vehicle high beam should be turn on/off.

Mapping Samples

Sample Description
Map Access Sample Demonstrates how to access map data from the maps module.
Map Tracker Sample Demonstrates tracking a car pose on an HD map for robust access to the current HD maps lane.
HD Maps Localization Sample Uses the HD map based localization module to update an estimate of the current car location within the map.

Planning Samples

Sample Description
HD Maps Lane Planner Sample Demonstrates how to plan which lanes to follow in order to get from a starting point to a destination.
Safety Force Field Sample Demonstrates how to check and correct a desired control for obstacle avoidance safety.
Note
For detailed instructions on building the samples from source, please refer to Building DriveWorks Samples.