|
VLink
2.0.0
A high-performance communication middleware
|
Zero-copy variable-length array of fixed-size 3-D detection / tracking records. 更多...
命名空间 | |
| vlink | |
| vlink::zerocopy | |
Zero-copy variable-length array of fixed-size 3-D detection / tracking records.
ObjectArray is the canonical message produced by 3-D perception, sensor fusion, and multi-object tracking pipelines. It packs a homogeneous array of Object records, each capturing the pose, dimensions, kinematics, classification, identity, and covariance of one obstacle. A 40-byte Header prefix carries sequencing and dual-timestamp metadata.
Object record is 144 bytes. Both sizes are locked by static_assert. Object uses 4-byte alignment because its widest field is 4 bytes; with the wire envelope (magic 4 + version 4 + struct 112) the payload starts at offset 120, an 8-byte boundary, so the requirement is comfortably met and a typed objects() pointer stays safe on strict-alignment architectures (ARM, AArch64).| Field | Type | Meaning |
|---|---|---|
label | char[32] | Class name (e.g. "car", "pedestrian") |
position[3] | float | Centre in metres (world frame) |
yaw | float | Heading in radians (REP-103) |
size[3] | float | Length, width, height in metres |
yaw_rate | float | Angular velocity in rad/s |
velocity[3] | float | Linear velocity in m/s |
score | float | Detection confidence in [0, 1] |
acceleration[3] | float | Linear acceleration in m/s^2 |
existence_probability | float | Existence probability in [0, 1] |
position_covariance[6] | float | Upper triangle of 3x3 covariance |
class_id | uint32_t | Numeric class identifier |
track_id | uint32_t | Tracking id (0 = unassociated detection) |
age | uint32_t | Tracking age in frames |
num_observations | uint32_t | Cumulative observation count |
motion_state | MotionState | Stationary / moving / stopped / parked |
source_type | SourceType | LiDAR / camera / radar / fusion / ultrasonic |
subtype_id | uint16_t | Fine-grained subtype |
reserved_buf | uint32_t | Reserved (wire-locked) |
Object record are POD; memcpy is the canonical serialiser. The sizeof values are locked by static_assert and form a permanent contract: vlink::zerocopy::* containers offer NO forward and NO backward binary compatibility, and every field including reserved bytes is part of the wire contract. reserved_buf_, reserved_buf2_, reserved_buf3_, reserved_buf4_, reserved_buf5_ are exposed through get_reserved* helpers and survive clear() and the copy / move helpers so producers can stamp minor flags. None of these slots may be repurposed by application code: future library revisions may bind them to real fields, silently breaking peers that abused the slot.