[89] | 1 | #ifndef STRUCTURE_VELODYNE_CART_H
|
---|
| 2 | #define STRUCTURE_VELODYNE_CART_H
|
---|
| 3 |
|
---|
| 4 | #define VELODYNE_BLOCK_SIZE 100
|
---|
| 5 | #define VELODYNE_PACKET_SIZE 1206
|
---|
| 6 | #define VELODYNE_SCAN_SIZE 4166
|
---|
| 7 | #define VELODYNE_NB_BLOCKS_PER_PACKET 12
|
---|
| 8 |
|
---|
| 9 | #pragma pack(push, 1)
|
---|
| 10 |
|
---|
| 11 | // 25 bytes size
|
---|
| 12 | typedef struct VelodyneCartPoint
|
---|
| 13 | {
|
---|
| 14 | float distance; // in meter - if 0 no return up to 65m
|
---|
| 15 | double X,Y,Z; // in meter if 0 no return up to 65m
|
---|
| 16 | unsigned char intensity; // 255 most intense return
|
---|
| 17 | }VelodyneCartPoint;
|
---|
| 18 |
|
---|
| 19 | // 100=VELODYNE_BLOCK_SIZE bytes size
|
---|
| 20 | typedef struct VelodyneCartBlock
|
---|
| 21 | {
|
---|
| 22 | unsigned short block; // 0xEEFF upper and 0xDDFF lower
|
---|
| 23 | float alpha; // azimuth in degrees
|
---|
| 24 | float beta; // elevation in degrees
|
---|
| 25 | struct VelodyneCartPoint Points[32]; // a couple of distance and intensity representing a point
|
---|
| 26 | }VelodyneCartBlock;
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | // size : 100*4166 + 2*4166 + 8 + 4 = 424 944 bytes
|
---|
| 30 | // structure containing data of a complete revolution of the lidar
|
---|
| 31 | typedef struct VelodyneCartData
|
---|
| 32 | {
|
---|
| 33 | VelodyneCartBlock Data[VELODYNE_SCAN_SIZE]; // data of one block of 32 beams (upper or lower)
|
---|
| 34 | unsigned short scanCount[VELODYNE_SCAN_SIZE]; // scan count relative to polarData above
|
---|
| 35 | road_time_t time; // time got in the packet containing first angle
|
---|
| 36 | road_timerange_t timerange; // timerange = diff( t(angle=0) - t(lastangle) )
|
---|
| 37 | short range; // not all polarData are useful, use range to know until which index you can use the data
|
---|
| 38 | }VelodyneCartData;
|
---|
| 39 |
|
---|
| 40 | #pragma pack(pop)
|
---|
| 41 |
|
---|
| 42 | #endif // STRUCTURE_VELODYNE_CART_H
|
---|