58 point(0.0f, 0.0f, 0.0f), intensity{0.0f} { }
60 point(x, y, z), intensity{intensity} { }
62 point(p), intensity{intensity} { }
65 out <<
"property float32 x\n" \
66 "property float32 y\n" \
67 "property float32 z\n" \
72 out << point.
x <<
' ' << point.
y <<
' ' << point.
z <<
' ' << intensity;
87 virtual void ResetMemory(std::vector<uint32_t> points_per_channel) {
88 DEBUG_ASSERT(GetChannelCount() > points_per_channel.size());
89 std::memset(_header.data() +
Index::SIZE, 0,
sizeof(uint32_t) * GetChannelCount());
91 uint32_t total_points =
static_cast<uint32_t
>(
92 std::accumulate(points_per_channel.begin(), points_per_channel.end(), 0));
95 _points.reserve(total_points * 4);
99 _points.emplace_back(detection.
point.
x);
100 _points.emplace_back(detection.
point.
y);
101 _points.emplace_back(detection.
point.
z);
102 _points.emplace_back(detection.
intensity);
virtual void ResetMemory(std::vector< uint32_t > points_per_channel)
static const FString SIZE
Serializes the data generated by Lidar sensors.
Helper class to store and serialize the data generated by a RawLidar.
This file contains definitions of common data structures used in traffic manager. ...
void WritePlyHeaderInfo(std::ostream &out) const
#define DEBUG_ASSERT(predicate)
void WriteDetection(std::ostream &out) const
LidarData(uint32_t ChannelCount=0u)
virtual void WritePointSync(SemanticLidarDetection &detection)
void WritePointSync(LidarDetection &detection)
LidarDetection(float x, float y, float z, float intensity)
LidarDetection(geom::Location p, float intensity)
Helper class to store and serialize the data generated by a Lidar.
std::vector< float > _points