Struct PointCloud¶
Defined in File schemas.hpp
Struct Documentation¶
-
struct PointCloud¶
A collection of N-dimensional points, which may contain additional fields with information like normals, intensity, etc.
Public Functions
-
FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)¶
Encoded the PointCloud as protobuf to the provided buffer.
On success, writes the serialized length to *encoded_len. If the provided buffer has insufficient capacity, writes the required capacity to *encoded_len and returns FoxgloveError::BufferTooShort. If the message cannot be encoded, writes the reason to stderr and returns FoxgloveError::EncodeError.
- Parameters:
ptr – the destination buffer. must point to at least len valid bytes.
len – the length of the destination buffer.
encoded_len – where the serialized length or required capacity will be written to.
Public Members
-
std::string frame_id¶
Frame of reference.
-
uint32_t point_stride = 0¶
Number of bytes between points in the
data
-
std::vector<PackedElementField> fields¶
Fields in
data
. At least 2 coordinate fields fromx
,y
, andz
are required for each point’s position;red
,green
,blue
, andalpha
are optional for customizing each point’s color.
-
std::vector<std::byte> data¶
Point data, interpreted using
fields
Public Static Functions
-
static Schema schema()¶
Get the PointCloud schema.
The schema data returned is statically allocated.
-
FoxgloveError encode(uint8_t *ptr, size_t len, size_t *encoded_len)¶