Please provide the following info: Hardware Platform: [DRIVE AGX Pegasus™ Developer Kit] Software Version: [Example: DRIVE Software 10] Host Machine Version: [Ubuntu 18.04] SDK Manager Version: [1.0.1.5538]
I have recorded data using the recorder tool. One of the files produced for the can bus is vehicle_can.bin. I would like to know the format of the CAN data in this file so I can parse the data out.
My intention is to parse the binary can file without using DriveWorks APIs. I am working on automated data analysis and would like to parse the file in python or create a parser in C++.
The development team will be using DriveWorks API for development purposes. In parallel we would like to setup automated data validation pipelines using a cluster and not be dependent on downloading and compiling the DriveWorks API to parse our CAN data from the binary CAN file produced by the DriveWorks recorder tool. That’s is why we seek to understand the format of the binary file so we can setup some pipelines in Python.
/// Holds a CAN package.
typedef struct dwCANMessage
{
/// Timestamp of the message in microseconds (using clock of the context).
dwTime_t timestamp_us;
/// CAN ID of the message sender.
uint32_t id;
/// Number of bytes of the payload.
uint16_t size;
/// Payload.
uint8_t data[DW_SENSORS_CAN_MAX_MESSAGE_LEN];
} dwCANMessage;
if fileVersion == 1 then
DW_SENSORS_CAN_MAX_MESSAGE_LEN == 8
sizeof(canMsg) == N == 22
else
DW_SENSORS_CAN_MAX_MESSAGE_LEN == 64
sizeof(canMsg) == N == 78