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

  • DriveWorks SDK Reference
    5.10.90 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Get Time Synchronized Data

    Get time synchronized lidar packets from live lidar sensor

    dwSAL_initialize(&sal, sdk);
    dwSensorParams lidarParams;
    lidarParams.parameters = "ip=192.168.3.43,port=2368,device=VELO_HDL64E,scan-frequency=10.0";
    lidarParams.protocol = "lidar.socket";
    dwSAL_createSensor(&lidarSensor, lidarParams, sal);
    dwSensorParams timeParams;
    timeParams.parameters = "nvpps-device=/dev/nvpps0,reference-type=NOVATEL_CAN,can-device=can0";
    timeParams.protocol = "time.nvpps";
    dwSAL_createSensor(&timeSensor, timeParams, sal);
    dwSensor_start(timeSensor);
    dwSensor_start(lidarSensor);
    while(loop) {
    // CODE: use the time synchronized lidar packets for other tasks
    }
    dwSAL_releaseSensor(&timeSensor);
    dwSAL_releaseSensor(&lidarSensor);
    #define DW_NULL_HANDLE
    Definition: Types.h:83
    DW_API_PUBLIC dwStatus dwSensorLidar_returnPacket(dwLidarDecodedPacket const *const data, dwSensorHandle_t const sensor)
    Returns the data read to the internal pool.
    DW_API_PUBLIC dwStatus dwSensorLidar_readPacket(dwLidarDecodedPacket const **const data, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
    Reads one scan packet.
    const char8_t * parameters
    Array of additional parameters provided to sensor creation.
    Definition: Sensors.h:106
    const char8_t * protocol
    Name of the protocol.
    Definition: Sensors.h:99
    DW_API_PUBLIC dwStatus dwSAL_createSensor(dwSensorHandle_t *const sensor, dwSensorParams const params, dwSALHandle_t const sal)
    Creates a new sensor managed by the SAL module with the given parameters.
    DW_API_PUBLIC dwStatus dwSensor_start(dwSensorHandle_t const sensor)
    Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
    DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t const sensor)
    Stops the sensor.
    DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *const sal, dwContextHandle_t const context)
    Creates and initializes a SAL (sensor abstraction layer) module.
    DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t const sensor)
    Releases a sensor managed by the SAL module.
    struct dwSensorObject * dwSensorHandle_t
    Handle representing a sensor.
    Definition: Sensors.h:86
    Holds sets of parameters for sensor creation.
    Definition: Sensors.h:95

    This can also be done with sensor recordings. For example, we can modify the example above with the following parameters to reference recorded data.

    lidarParams.parameters = "file=lidar_recording.bin";
    lidarParams.protocol = "lidar.virtual";
    timeParams.parameters = "file=time_recording.bin";
    timeParams.protocol = "time.virtual";

    For more details see Time Sensor Sample

    人人超碰97caoporen国产