driveworks gtc china 2018 - on-demand.gputechconf.comwhat is driveworks? • driveworks is the sdk...
TRANSCRIPT
Nov 20th 2018
DRIVEWORKS SDK
2NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DRIVE Software
DRIVE AV
DriveWorks SDK
NVIDIA AUTONOMOUS DRIVE SOFTWARE
DRIVE AR
DRIVE OS
NVMedia CUDA TensorRT
DRIVE Core
DRIVE CalibrationDRIVE Networks
DRIVE IX
Gaze Head Pose Face Recognition
Gesture Voice Recognition & Lip Reading
DRIVE Perception
DRIVE Mapping
DRIVE PlanningDRIVE AV Viz
DRIVE IX Viz
DRIVE AV Application
(Roadrunner)
3NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
WHAT IS DRIVEWORKS?
• DriveWorks is the SDK for Autonomous Driving
• Modules, Runtime, Dev Tools, Reference Applications, HW Acceleration Support
• The DriveWorks SDK contains six libraries that provide a foundation for autonomous driving application development (in progress)
• DRIVE Core, DRIVE Calibration, DRIVE Networks, DRIVE Perception, DRIVE Mapping, & DRIVE Planning
• Each library consists of software modules - discrete units of functionality that can be used independently of or in conjunction with each other, providing flexibility and performance
• Design Philosophy
• Modular, Optimized, Open
4NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
WHY DRIVEWORKS?
• DriveWorks is designed to achieve the full throughput limits of the computer and make it easy for partners to develop SDCs
• This requires careful architecture of the end-to-end software pipeline
• Efficiently utilize the many processors inside Tegra
• Optimize data communication formats between engines
• Minimize data copies (zero copy exchange of buffers)
• Create and utilize the most efficient algorithms
• Optimize implementations
5NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DRIVEWORKS PROVIDES
• Highly optimized modules
• API documentation of module interfaces
• Instructions to insert customer-defined modules
• Samples (source and binary) and Tools (binary)
• HW support
• Desktop PC, DRIVE AGX Xavier, DRIVE AGX Pegasus
• OS support
• PC Linux 64bit, DRIVE OS Linux and DRIVE OS QNX
6NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DriveWorks SDK
DRIVE NetworksDRIVE Networks
DRIVEWORKS MODULES
RadarLidar
IMU/GPSCAN
Cameras
DRIVE OS
DriveNet OpenRoadNet SignNet
LaneNetDRIVE CalibrationDRIVE Calibration
EgomotionSelf-
CalibrationCalibration
Tools
DRIVE CoreDRIVE Core
Sensor Abstraction
Layer
Recorder / Dev Tools
World Model Definition
DNN Framework
NvMedia CUDA TensorRT
Vehicle IO Image Processing
Point Cloud Processing
DriveWorksFramework
LightNet
DRIVE Perception*DRIVE Perception*
DRIVE Mapping*DRIVE Mapping*
DRIVE Planning*DRIVE Planning*
Obstacle Path Wait Conditions Fusion
MapStreamClient
MapStream(Cloud)
MapServices(Cloud)
Localization
Behavior Planner
Route Planner Lane Planner VDC
*APIs not currently exposed; functionality
experienced through DRIVE AV Application only
7
DRIVEWORKS CORE
8NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
SENSOR ABSTRACTION LAYER MODULESCommon and simple unified interface to the AV sensors
• HW sensor abstraction• Camera, Radar, Lidar, IMU, GPS, and CAN sensors• Plug-in framework for custom sensors
• Sensor lifecycle management• Event-driven and non-blocking data-flow model• Timestamping of sensors and events• Sensor statistics
• Raw sensor serialization• Recording of sensors• Replay recorded data with virtual sensors
• API/Processor conversion/transfer: CUDA, GL, NvMedia, CPU
• Additional SoC engine support: H264 encoder/decoders, VIC, etc.
• Support for Hardware and Software Image Signal Processing (ISP)C
9NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
Supports:
- Native outputs (RAW or YUV/RGB)
- CUDA outputs (RAW, RGBA, YUV)
- Embedded lines, with parsing
- Synchronized captures
- Basic Sensor Statistics
- Generalized plugin architecture for GMSL coming soon*
*Planned
CAMERA ABSTRACTION
GMSL 1
• OV10640
• AR0231
• AR0144
• AR0138*
Supported Sensors Data Structures
typedef struct dwImageMetaData {
int32_t flags;
float32_t exposureTime;
float32_t analogGain;
float32_t
conversionGain;
float32_t digitalGain;
float32_t wbGain[4];
uint32_t msbPosition;
dwImageDataLines dataLines;
} dwImageMetaData;
typedef struct dwImageProperties {
dwImageType type;
uint32_t width;
uint32_t height;
dwImageFormat format;
dwImageMetaData meta;
dwImageMemoryType memoryLayout;
} dwImageProperties;
typedef struct dwImageCUDA {
dwImageProperties prop;
size_t pitch[4];
void *dptr[4];
cudaArray_t array[4];
dwTime_t timestamp_us;
} dwImageCUDA;
GMSL 2
• AR0220*
• AR0820* (8MP)
GMSL 2
• User plugin*
10NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
Supports:
• TCP and UDP based Lidars
• Rotational or planar scanners
• Basic sensor statistics
Lidar Post-Processor
• Aggregates full sweeps
• Produces Depth images
*Planned
LIDAR ABSTRACTION
Velodyne
VLP16/32 HDL32
HDL64
IBEO
Lux4L
Lux8L*
Quanergy
M8
User Plugin
(Ethernet)
typedef struct
{
float32_t x;
float32_t y;
float32_t z;
float32_t intensity;
}dwLidarPointXYZI;
typedef struct
{
float32_t theta;
float32_t phi;
float32_t radius;
float32_t intensity;
}dwLidarPointRTHI;
typedef struct dwLidarDecodedPacket {
uint64_t hostTimestamp;
uint64_t sensorTimestamp;
uint64_t duration;
uint32_t maxPoints;
uint32_t nPoints;
const dwLidarPointRTHI *pointsRTHI;
const dwLidarPointXYZI *pointsXYZI;
}dwLidarDecodedPacket;
Supported Sensors Data Structures
Cepton*
11NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
Supports:
• Ethernet (TCP/UDP) and CAN radars
• Short, Medium and Long range
• Egomotion feedback to sensor
• Detections and Tracks
• Basic sensor statistics
Radar Tracker
• Homebrew radar detection, clustering, and tracking
RADAR ABSTRACTION
Ethernet:
Delphi ESR2.5
Continental ARS430
CAN:
Continental ARS430
User Plugin
(Ethernet)
typedef struct
{
float32_t x;
float32_t y;
float32_t Vx;
float32_t Vy;
float32_t Ax;
float32_t Ay;
float32_t azimuth;
float32_t radius;
float32_t radialVelocity;
float32_t radialAcceleration;
float32_t rcs;
float32_t elevationAngle;
bool elevationValidity;
} dwRadarDetection;
Supported Sensors Data Structures
12NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
Supports:
• Any USB-based NMEA sensor supported by kernel
• USB and UART for Xsens
• Supports Basic sensor statistics
*Planned
GPS/IMU ABSTRACTION
GPS:
NMEA
• GPS nmea0183 (USB)
• GPS Xsens MTI-G-710
Native
• GPS Xsens MTI-G-710
• GPS Novatel SPAN-IGM
IMU:
NMEA
• IMU Xsens MTI-G-710
Native
• IMU Xsens MTI-G-710
• IMU Novatel SPAN-IGM
CAN
• Dataspeed (CAN)
typedef struct dwIMUFrame {
uint32_t flags;
dwTime_t timestamp_us;
float64_t orientation[3];
float64_t
orientationQuaternion[4];
float64_t turnrate[3];
float64_t acceleration[3];
float64_t magnetometer[3];
float64_t heading;
dwIMUHeadingType headingType;
} dwIMUFrame;
typedef struct dwGPSFrame {
dwTime_t timestamp_us;
float64_t latitude;
float64_t longitude;
float64_t altitude;
float64_t course;
float64_t speed;
float64_t climb;
char utcTime[16];
char utcDate[16];
float64_t hdop;
float64_t vdop;
uint32_t flags;
} dwGPSFrame;
Supported Sensors Data Structures
13NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
CAN ABSTRACTIONSupported Sensors
CAN bus
• Supports socket.can and Aurix CAN
• DBC interpreter encoder/decoder
• CAN filters
Socket CAN
• Tegra
• PCAN
• Kvaiser
AURIX CAN
14NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
SAL SUPPORTED SENSORSType Model
Camera OV10635
Camera AR0138
Camera AR0231-grbg-ae-sd3321
Camera AR0231-rccb (multiple lenses and exposure modes) - DRIVE AV
Camera ar0144-cccc-none-gazet1 for - DRIVE IX
Camera FLIR/Point Grey
GPS Any NMEA-compatible sensor using a serial UART
GPS Xsens MTi-G-700 (serial based NMEA protocol + USB proprietary)
GPS NovAtel dGPS/SPAN-IGM
IMU Xsens MTi-G-700 (serial based NMEA protocol + USB proprietary)
IMU NovAtel dGPS/SPAN-IGM
Lidar Quanergy M81 (QUAN_M81A)
Lidar IBEO Lux 4L (IBEO_LUX)
Lidar Velodyne VLP16 (VELO_VLP16)
Lidar Velodyne VLP16 Hi-Res (VELO_VLP16HR)
Lidar Velodyne HDL32E (VELO_HDL32E)
Lidar Velodyne VLP32C (VELO_VLP32C)
Lidar Velodyne HDL64E (VELO_HDL64E)
Lidar CUSTOM
Radar Delphi ESR2.5 (DELPHI_ESR2_5)
Radar Continental ARS430 (CONTINENTAL_ARS430)
Radar Continental ARS430 (CONTINENTAL_ARS430_CAN)
Radar CUSTOM
15NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
VEHICLE ABSTRACTION
Drive-By-Wire (DBW) devices
• Device provides Vehicle State
• Module produces Vehicle commands
*Planned
Supported DBW
typedef struct {
bool enable;
float32_t steeringWheelAngle;
float32_t steeringSpeed;
bool throttlePercent;
float32_t throttleValue;
bool brakePercent;
float32_t brakeValue;
float32_t brakeTorque;
dwVehicleIOGear gear;
dwVehicleIOTurnSignal turnSig;
bool clearFaults;
bool throttleValid;
bool brakeValid;
bool steeringValid;
bool speedValid;
bool gearValid;
bool turnSigValid;
} dwVehicleIOCommand;
Data Structures
Generic
DataSpeed
Paravan
SpaceDrive*
16NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
• Two layered approach to easily add support for non-native lidars and radars
• Device-Specific Decoder
• Device-specific decoder that handles the interpretation and parsing of raw data
• DW provides support for integrating custom decoders into the plug-in architecture
LIDAR AND RADAR SENSOR PLUGINS
17NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
IMAGE PIPELINE MODULESCreate and set images handles that are compatible with NVIDIA® DriveWorks modules
• Unified image containers• Formats YUVxxx, RGB, Raw• Memory layout: Pitch linear / Block Linear• Image Types
• CUDA (pitch-linear & block-linear)• NVMEDIA (pitch-linear & block-linear)• GL (block-linear)• CPU (pitch-linear)
• Image Streaming• Transfers images between APIs
• CUDA <-> GL <-> CPU <-> NvMedia• Zero copies whenever possible• Cross-process and Multi-thread
• ISP• Convert raw images to usable color spaces
NVmedia CUDA GL
CPU
18NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
IMAGE PROCESSING MODULESAccelerated low level 2D image processing capabilities
• Multi-camera color correction
• Features – detect and track features between frames recorded
by one camera
• 2D Feature Tracker, 2D Scaling Tracker, & 2D Box Tracker
• Implemented as CUDA kernels and runs asynchronously
on the GPU
• Structure from Motion - reconstructs the 3D structure of the
scene given a moving camera rig
• Triangulation, Pose Refinement, Feature Prediction
• Video rectification
• Stereo rectification and disparity estimation
19NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
POINT CLOUD PROCESSING MODULES
Hardware acceleration of common point cloud processing
algorithms
• Explore HW acceleration options
• Initially lidar centric, but generalized to point clouds
20NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
POINT CLOUD PROCESSING MODULES
Hardware acceleration of common point cloud processing
algorithms
• Provides access to partial/full 3D Lidar sweep and 360-
degree Lidar images for rotating beam lidars
• LIDAR packet accumulation
• Range and intensity image generation
• Aligns 3D points from a pair of lidar spins via Point-Plane
Iterative Closest Point algorithm
• 3D Plane extraction
• Registration
21NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
ACTUATION MODULESInterface with the vehicle to receive state information and send
actuation commands
Features
• SW abstraction of the CAN-based control functions of the
vehicle actuation unit or control box, also known as a drive-by-
wire (DBW) box
• Supports multiple DBW backends, enabling adaptation to custom
devices
• DataSpeed
• Paravan SpaceDrive (in development)
• Generic CAN based
ApplicationdwVehicleIO dwVehicleIO
22NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DW INFRASTRUCTURE MODULESLow-level support to all DriveWorks software development
• Core
• Creation and release of SDK context handles
• Logging
• System/Platform Information
• Time and memory Management
• HAL
• Communication
• Platform-agnostic inter-process communication
• RoadCast (vehicle logs)
• Visualization
• Renderer for maps, projections, and drawing primitives
*************************************************
Welcome to Driveworks SDK
Initialize DriveWorks SDK v0.3.131-experimental
Experimental Debug build with GNU 4.8.4 from heads/dev/name/core/gpu-0-gc470664
SDK: no resources mounted
SDK: GL not available. Running with restricted functionality.
Context of Driveworks SDK successfully initialized.
Version: 0.3.131
GPU devices detected: 1
----------------------------------------------
Device: 0,
CUDA Driver Version / Runtime Version : 8.0 / 8.0
CUDA Capability Major/Minor version number: 3.0
Total amount of global memory in MBytes:977.062
Memory Clock rate Ghz: 91000
Memory Bus Width bits: 128
L2 Cache Size: 262144
Maximum 1D Texture Dimension Size (x): 65536
Maximum 2D Texture Dimension Size (x,y): 65536, 65536
Maximum 3D Texture Dimension Size (x,y,z): 4096, 4096, 4096
Maximum Layered 1D Texture Size, (x): 16384 num: 2048
Maximum Layered 2D Texture Size, (x,y): 16384, 16384 num: 2048
Total amount of constant memory bytes: 65536
Total amount of shared memory per block bytes: 49152
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): 1024,1024,64
Max dimension size of a grid size (x,y,z): 2147483647,65535,65535
Maximum memory pitch bytes: 2147483647
Texture alignment bytes: 512
Concurrent copy and kernel execution: Yes, copy engines num: 1
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID: 0, Device PCI Bus ID: 1, Device PCI location ID: 0
Compute Mode: Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)
Driveworks SDK released
Happy autonomous driving!
23NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
RECORDING AND REPLAY TOOLS
Record, synchronize, and playback the data captured from
multiple devices attached to your NVIDIA DRIVE™ platform
• GUI or command line (CLI) Recorder Tools save sensor data to eSATA/USB 3.0 device or another data storage device connected through Ethernet
• Tuned performance to avoid glitches during capturing
and recording
• Replayer Tool for inspection
• Recording support tools:
• Verification of configuration and integrity of each
recording session
• Seek table creation for fast seek into recorded files
• Recording clipping tools
• Recording conversion tools
24NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
ADDITIONAL DEVELOPMENT TOOLS
Tools for processing map data
• Convert a DriveWorks map file to a KML file
• Convert HERE Maps to DriveWorks map format
• Replay a captured MapStream from a top down view
Additional tools to aid in software development and debugging
• Optimize a given Caffe or UFF model using TensorRT
25NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
HARDWARE ACCELERATION SUPPORTDRIVE AGX platforms provide a plethora of HW engines, such as:
DLA, PVA, ISP, CODEC, GPU, multicore CPUs
DriveWorks SDK efforts:
• Efficient programming model to support multiengine backends
• Efficient async memory transfers
• Efficient async workload launches
• Add support for new engines
• DLA, ISP, PVA
26NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DW FRAMEWORK
• Describe execution pipelines in an easy manner with few lines of code
• Encapsulate boilerplate code (containerization of DW modules)
• Provide an execution model based on Graph traversing
• Task Scheduling support (app driven, best-effort,...)
• Support multi process/multi VM/multiprocessor environments
• SW deliverable:
• Separate library: libdwgraph.so
• C++11 Interface
27NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
28NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
dwPass: encapsulates atomic unit of computation, tied to a single HW engine
dwNode: groups a sequence of passes that implement a given algorithm
dwPort + dwChannel: abstracts communication between nodes (& application)
dwComputeGraph: groups a Graph of nodes and channels. Provides factories
29
DRIVEWORKS NETWORKS
30NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
DRIVE NETWORKS Framework for Deep Neural Network processing
• Data pre-processing to make input compatible with network
• Inference using deep neural networks that were generated
with NVIDIA® TensorRT™
• TensorRT plug-in support to integrate custom networks
within DriveWorks
• DNNs (DriveNet, LaneNet, OpenRoadNet, SignNet, LightNet)
31
DRIVEWORKS CALIBRATION
32NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
SELF-CALIBRATION MODULESOnline correction of nominal sensor calibration parameters
based on up-to-date sensor readings
• Lane-based Camera Self-Calibration
• Feature-based Camera Self-Calibration
• IMU Self-Calibration
• Lidar Self-Calibration
• Calibration Engine
33NVIDIA CONFIDENTIAL. DO NOT DISTRIBUTE.
CALIBRATION TOOLSSuite of tools for offline calibration of cameras and IMUs
• Camera Intrinsic calibration – Ftheta model
• Camera Extrinsic calibration
• Two cameras
• 4-camera setup (surroundview config)
• Single camera setup (monocular)
• IMU Calibration
THANK YOU