Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.14.77 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    SensorManager.h
    Go to the documentation of this file.
    1
    2//
    3// Notice
    4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
    5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
    6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
    7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
    8//
    9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
    10// information or for any infringement of patents or other rights of third parties that may
    11// result from its use. No license is granted by implication or otherwise under any patent
    12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
    13// expressly authorized by NVIDIA. Details are subject to change without notice.
    14// This code supersedes and replaces all information previously supplied.
    15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
    16// components in life support devices or systems without express written approval of
    17// NVIDIA CORPORATION & AFFILIATES.
    18//
    19// SPDX-FileCopyrightText: Copyright (c) 2017-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
    20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
    21//
    22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
    23// property and proprietary rights in and to this material, related
    24// documentation and any modifications thereto. Any use, reproduction,
    25// disclosure or distribution of this material and related documentation
    26// without an express license agreement from NVIDIA CORPORATION or
    27// its affiliates is strictly prohibited.
    28//
    30
    45#ifndef DW_SENSORS_SENSORMANAGER_H_
    46#define DW_SENSORS_SENSORMANAGER_H_
    47
    48#include <dw/rig/Rig.h>
    49#include <dw/sensors/Sensors.h>
    51#include <dw/sensors/imu/IMU.h>
    53#include <dw/sensors/gps/GPS.h>
    58
    60
    61#ifdef __cplusplus
    62extern "C" {
    63#endif
    64
    65typedef struct dwSensorManagerObject* dwSensorManagerHandle_t;
    66
    69
    71typedef struct
    72{
    75
    80
    83
    87 uint32_t sensorIndex;
    88
    90 uint32_t sensorIndices[DW_SENSORMANGER_MAX_CAMERAS];
    91
    94 uint32_t numCamFrames;
    96
    97 // Data accessor for all other sensors
    104 const uint8_t* rawData;
    105 size_t rawDataSize;
    106 const dwUltrasonicEnvelope* ultrasonicFrame; // Ultrasonic envelope in this event.
    108
    114{
    118
    123typedef struct
    124{
    132
    137typedef struct
    138{
    141
    143 uint32_t enableSensors[DW_SENSORMANGER_MAX_NUM_SENSORS];
    144
    148
    158
    159typedef void (*dwSensorManagerDispatcher_t)(const dwSensorEvent*, void*, dwStatus);
    160
    174 size_t poolSize, dwSALHandle_t const sal);
    175
    197 dwRigHandle_t rc,
    198 size_t poolSize, dwSALHandle_t sal);
    199
    224 dwRigHandle_t const rc,
    225 const dwSensorManagerParams* params,
    226 size_t poolSize, dwSALHandle_t const sal);
    227
    239
    260
    283dwStatus dwSensorManager_addCameraSensor(const char8_t* groupName, uint32_t siblingIndex,
    284 dwSensorParams params, uint64_t clientData,
    286
    298
    310
    322
    342
    358
    372
    386
    400
    415 uint32_t sensorTypeIndex, dwSensorManagerHandle_t sm);
    416
    432 uint32_t sensorIndex, dwSensorManagerHandle_t sm);
    433
    447
    461#ifdef __cplusplus
    462}
    463#endif
    464
    466#endif // DW_SENSORS_SENSORMANAGER_H_
    NVIDIA DriveWorks API: CAN
    NVIDIA DriveWorks API: Cameras
    NVIDIA DriveWorks API: Data
    dwStatus
    Status definition.
    Definition: ErrorDefs.h:45
    A GPS packet containing localization information.
    Definition: GPSFrame.h:205
    NVIDIA DriveWorks API: GPS
    This structure contains one frame of data from a IMU sensor.
    Definition: IMUTypes.h:366
    NVIDIA DriveWorks API: IMU
    NVIDIA DriveWorks API: Lidar
    NVIDIA DriveWorks API: Radar
    NVIDIA DriveWorks API: Rig Configuration
    #define DW_SENSORMANGER_MAX_CAMERAS
    #define DW_SENSORMANGER_MAX_NUM_SENSORS
    NVIDIA DriveWorks API: Sensors
    struct dwCameraFrame * dwCameraFrameHandle_t
    Handle to captured frame.
    Definition: Camera.h:73
    Holds a CAN package.
    Definition: CAN.h:113
    int64_t dwTime_t
    Specifies a timestamp unit, in microseconds.
    Definition: BasicTypes.h:65
    #define DW_API_PUBLIC
    Definition: Exports.h:54
    Holds a data packet.
    Definition: Data.h:61
    Defines the structure for a decoded lidar packet.
    Definition: Lidar.h:233
    Defines the structure for a complete radar scan.
    Definition: Radar.h:66
    struct dwRigObject * dwRigHandle_t
    Handle representing the Rig interface.
    Definition: Rig.h:72
    uint32_t numCamFrames
    Data accessor for camera.
    Definition: SensorManager.h:94
    uint32_t numEnableSensors
    Number of entries in the 'enableSensors' list.
    dwGPSFrame gpsFrame
    GPS frame in this event.
    Definition: SensorManager.h:98
    dwIMUFrame imuFrame
    IMU frame in this event.
    Definition: SensorManager.h:99
    uint32_t sensorTypeIndex
    Index of the given sensor as defined by the order in which it was created and the type of sensor it i...
    Definition: SensorManager.h:79
    const dwLidarDecodedPacket * lidFrame
    Lidar decoded packet in this event.
    dwCANMessage canFrame
    CAN message frame in this event.
    bool singleVirtualCameraGroup
    Whether to associate virtual cameras to individual 'camera-group's (default), or to a single 'camera-...
    bool accumCamFrames
    Whether Dispatcher shall accumulated frames from all cameras into a single event.
    const dwDataPacket * dataFrame
    dwDataPacket(see reference 15) in this event.
    size_t rawDataSize
    Raw data size in this event.
    const dwRadarScan * radFrame
    Radar scan in this event.
    dwTime_t camFramesTimeDiffLimit
    Up to how much can timestamps of camera frames accumulated in a single event differ,...
    dwDispatcherParams dispatcherParams
    Parameters to configure dispatcher mode.
    const dwUltrasonicEnvelope * ultrasonicFrame
    dwTime_t timestamp_us
    Timestamp (us)
    Definition: SensorManager.h:82
    const uint8_t * rawData
    Raw data in this event.
    uint32_t sensorIndex
    The index of the sensor as defined by the order in which it was created.
    Definition: SensorManager.h:87
    dwSensorType type
    Type of sensor providing data for this event.
    Definition: SensorManager.h:74
    dwTime_t timeout
    Timeout value to be used in dispatcher mode for virtual files, in microsecond.
    DW_API_PUBLIC dwStatus dwSensorManager_stop(dwSensorManagerHandle_t sm)
    Stops all sensors.
    DW_API_PUBLIC dwStatus dwSensorManager_initializeFromRig(dwSensorManagerHandle_t *sm, dwRigHandle_t rc, size_t poolSize, dwSALHandle_t sal)
    Creates and initializes a SensorManager module, adding all sensors in the provided Rig Configuration.
    DW_API_PUBLIC dwStatus dwSensorManager_getNumSensors(uint32_t *count, dwSensorType type, dwSensorManagerHandle_t sm)
    Gets the number of sensors instantiated for a given sensor type.
    dwSensorManagerDataMode
    Data mode in this unit, which determines whether read raw data.
    DW_API_PUBLIC dwStatus dwSensorManager_addSensor(dwSensorParams params, uint64_t clientData, dwSensorManagerHandle_t sm)
    Adds a sensor to the SAL instance.
    DW_API_PUBLIC dwStatus dwSensorManager_acquireNextEvent(const dwSensorEvent **ev, dwTime_t timeoutMicroSeconds, dwSensorManagerHandle_t sm)
    Called by the application to consume the next available sensor event ready for consumption.
    struct dwSensorManagerObject * dwSensorManagerHandle_t
    Handle of sensor manager.
    Definition: SensorManager.h:65
    struct dwUltrasonicEnvelope dwUltrasonicEnvelope
    Not available as of current release. Will be added in future releases.
    Definition: SensorManager.h:68
    DW_API_PUBLIC dwStatus dwSensorManager_initialize(dwSensorManagerHandle_t *sm, size_t poolSize, dwSALHandle_t const sal)
    Creates an instance of SensorManager module.
    DW_API_PUBLIC dwStatus dwSensorManager_getSensorClientData(uint64_t *cd, uint32_t sensorIndex, dwSensorManagerHandle_t sm)
    Gets sensor's clientData according to the assigned sensorIndex.
    DW_API_PUBLIC dwStatus dwSensorManager_reset(dwSensorManagerHandle_t sm)
    Resets all sensors.
    DW_API_PUBLIC dwStatus dwSensorManager_initializeFromRigWithParams(dwSensorManagerHandle_t *sm, dwRigHandle_t const rc, const dwSensorManagerParams *params, size_t poolSize, dwSALHandle_t const sal)
    Creates and initializes a SensorManager module, adding enabled sensors in the provided Rig Configurat...
    DW_API_PUBLIC dwStatus dwSensorManager_start(dwSensorManagerHandle_t sm)
    Starts all sensors.
    DW_API_PUBLIC dwStatus dwSensorManager_releaseAcquiredEvent(const dwSensorEvent *ev, dwSensorManagerHandle_t sm)
    Releases a previously acquired event back to the pool.
    DW_API_PUBLIC dwStatus dwSensorManager_setTimeout(dwTime_t timeout, dwSensorManagerHandle_t sm)
    Sets the timeout to wait for a new frame across all sensors.
    DW_API_PUBLIC dwStatus dwSensorManager_getSensorHandle(dwSensorHandle_t *handle, uint32_t sensorIndex, dwSensorManagerHandle_t sm)
    Gets the sensor handle to the specified sensor.
    DW_API_PUBLIC dwStatus dwSensorManager_addCameraSensor(const char8_t *groupName, uint32_t siblingIndex, dwSensorParams params, uint64_t clientData, dwSensorManagerHandle_t sm)
    Adds a camera sensor to the SAL instance.
    DW_API_PUBLIC dwStatus dwSensorManager_getSensorTypeIndex(uint32_t *sensorTypeIndex, dwSensorType *type, uint32_t sensorIndex, dwSensorManagerHandle_t sm)
    Gets sensor's relative index and type based upon its sensor index.
    void(* dwSensorManagerDispatcher_t)(const dwSensorEvent *, void *, dwStatus)
    DW_API_PUBLIC dwStatus dwSensorManager_release(dwSensorManagerHandle_t sm)
    Releases the SensorManager module by deleting the handle.
    DW_API_PUBLIC dwStatus dwSensorManager_getSensorIndex(uint32_t *sensorIndex, dwSensorType type, uint32_t sensorTypeIndex, dwSensorManagerHandle_t sm)
    Gets sensor's index according to the dwSensorType and the sensorTypeIndex.
    DW_API_PUBLIC dwStatus dwSensorManager_setDispatcher(dwSensorManagerDispatcher_t dispatchPtr, void *const cookie, dwSensorManagerHandle_t sm)
    Sets sensor's dispatcher function when the feature is turned on.
    @ DW_SENSOR_MANAGER_DATA_MODE_NON_RAW
    Sensor manager doesn't read raw data, but just offer decoded packet for users.
    @ DW_SENSOR_MANAGER_DATA_MODE_RAW
    Sensor manager will read only raw data.
    Parameters for dispatcher, used to define some behaviors of dispatcher.
    Structure for returning data upon any sensor event.
    Definition: SensorManager.h:72
    Parameters for sensor manager, used to create a sensor manager.
    struct dwSALObject * dwSALHandle_t
    Handle representing the Sensor Abstraction Layer interface.
    Definition: Sensors.h:83
    dwSensorType
    Defines the type of sensors that are available in DriveWorks.
    Definition: Sensors.h:195
    struct dwSensorObject * dwSensorHandle_t
    Handle representing a sensor.
    Definition: Sensors.h:86
    Holds sets of parameters for sensor creation.
    Definition: Sensors.h:95
    人人超碰97caoporen国产