Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
Target Operating System
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
SDK Manager Version
Host Machine Version
native Ubuntu 18.04
I have written two custom sensor plugins using
Both are working as expected with
sample_imu_logger --driver imu.custom and
sample_gps_logger --driver gps.custom.
I have also written respective .json rig files, and the
recorder tool saves the data succssfully.
However, only the IMU plugin can be played back using
sample_imu_logger --driver imu.virtual. The GPS plugin does not work when trying to play back using
sample_gps_logger --driver gps.virtual.
Both plugins were implemented in a nearly identical way. In fact,
pushData are identical between the two.
I did realise that
parseData in IMU plugin requires return
DW_NOT_AVAILABLE when there is not enough data to parse, whereas GPS plugin requires return
DW_FAILURE when there is not enough data to parse. Both plugins require return
DW_SUCCESS when there is more data to parse. This is a strange inconsistency and I noticed the documentation in DriveWorks 2.2 is wrong because it says GPS parseData should return
DW_NOT_AVAILABLE rather than
Debugging into what is going on when playing back
gps.virtual, it starts from
readRawData since the raw data comes from file instead. It seems that
size is 0, which is causing the problem. However it is strange that in
size is correct and therefore it can be played back.
Perhaps this is to do with the strange requirement for
readRawData to output to
data pointer a header consisting of
uint32_t size and
dwTime_t timestamp before payload. It is strange because size is also output to
size pointer. It is even more strange because I tested IMU plugin without the header, and it still works in live, recording and imu.virtual playback. It is clear that for IMU plugin, size is taken from the
size pointer rather than from the data header.
So maybe the problem is related to the strange GPS plugin inconsistencies? Maybe the size field in data header is used by GPS but not by IMU plugin? But for GPS plugin, gps.virtual playback does not work (size 0 in pushData) even with and without the size header.