You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, similar models from the same vendor share very little of their decoder code despite their decoders working largely the same. This issue calls for a generalized decoder (at least per vendor) that is only specialized where necessary.
Purpose
De-duplicated code is much more maintainable/understandable
Optimizations/bugfixes for one lidar decoder would automatically apply to all decoders
Details
For Hesai lidar packets:
The pre-header and header fields are the same format (except for Pandar-64 (short header) and Pandar-40P (no header))
The block (≈ lidar column) format is identical except for an optional fourth (mostly unused) byte
The body (group of blocks) format is the same except for number of blocks, fine azimuth and checksum fields
Formats in the tail are wildly different. However, only a few fields are used by Nebula and those do have the same format
Return modes can be handled in a generalized way (format is consistent across models)
The overall algorithm of decoding the packets is basically identical (parameterization is of course model-dependent).
Possible approaches
Implement the decoding algorithm fully generically, using specific model definitions (as they are already largely present) for parameterization. The model definitions should re-use structs for headers/blocks whereever possible. If the structs are packed, the memcpy-based parser from pandar_128_e4x_decoder can be used for all models. Accessor functions to the specific struct locations can then provide the necessary abstraction.
The text was updated successfully, but these errors were encountered:
Description
Currently, similar models from the same vendor share very little of their decoder code despite their decoders working largely the same. This issue calls for a generalized decoder (at least per vendor) that is only specialized where necessary.
Purpose
Details
For Hesai lidar packets:
The overall algorithm of decoding the packets is basically identical (parameterization is of course model-dependent).
Possible approaches
Implement the decoding algorithm fully generically, using specific model definitions (as they are already largely present) for parameterization. The model definitions should re-use structs for headers/blocks whereever possible. If the structs are packed, the
memcpy
-based parser frompandar_128_e4x_decoder
can be used for all models. Accessor functions to the specific struct locations can then provide the necessary abstraction.The text was updated successfully, but these errors were encountered: