24 class SemanticLidarSerializer;
25 class SemanticLidarHeaderView;
84 out <<
"property float32 x\n" \
85 "property float32 y\n" \
86 "property float32 z\n" \
87 "property float32 CosAngle\n" \
88 "property uint32 ObjIdx\n" \
89 "property uint32 ObjTag";
102 static_assert(
sizeof(float) ==
sizeof(uint32_t),
"Invalid float size");
142 virtual void ResetMemory(std::vector<uint32_t> points_per_channel) {
150 uint32_t total_points =
static_cast<uint32_t
>(
151 std::accumulate(points_per_channel.begin(), points_per_channel.end(), 0));
160 for (
auto idxChannel = 0u; idxChannel <
GetChannelCount(); ++idxChannel)
#define DEBUG_ASSERT(predicate)
virtual void WriteChannelCount(std::vector< uint32_t > points_per_channel)
float GetHorizontalAngle() const
std::vector< SemanticLidarDetection > _ser_points
virtual void ResetMemory(std::vector< uint32_t > points_per_channel)
SemanticLidarData & operator=(SemanticLidarData &&)=default
SemanticLidarData(uint32_t ChannelCount=0u)
uint32_t GetChannelCount() const
void SetHorizontalAngle(float angle)
virtual void WritePointSync(SemanticLidarDetection &detection)
std::vector< uint32_t > _header
uint32_t _max_channel_points
virtual ~SemanticLidarData()
Helper class to store and serialize the data generated by a RawLidar.
uint32_t object_idx
表示检测光线与被击中物体法线之间夹角的余弦值,初始化为0。
uint32_t object_tag
被检测物体的索引
float cos_inc_angle
表示检测到的点的位置信息
SemanticLidarDetection(float x, float y, float z, float cosTh, uint32_t idx, uint32_t tag)
构造函数,根据给定的坐标值、夹角余弦值、物体索引和语义标签来初始化对象,方便从具体数值创建检测点对象。 检测点的x坐标值。 y 检测点的y坐标值。
void WriteDetection(std::ostream &out) const
将该检测点的具体数据(坐标、夹角余弦值、物体索引和语义标签)写入到给定的输出流中,用于将单个检测点的数据输出到流中,可能用于保存数据或者传输等操作。
void WritePlyHeaderInfo(std::ostream &out) const
将该检测点相关的属性信息以PLY文件格式的头部信息形式写入到给定的输出流中,PLY文件常用于存储三维模型等数据,这里可能用于后续将激光雷达数据保存为PLY格式时写入头部相关描述信息。
SemanticLidarDetection(geom::Location p, float cosTh, uint32_t idx, uint32_t tag)
构造函数,根据给定的位置对象、夹角余弦值、物体索引和语义标签来初始化对象,同样用于创建检测点对象,只是参数形式使用已有的位置对象。
SemanticLidarDetection()=default
被检测物体的语义标签
Serializes the data generated by Lidar sensors.