Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/lidars/livoxsdk2/LivoxClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void LivoxClient::PointCloudCallback(uint32_t handle, const uint8_t dev_type, Li
point.laser_id = laser_id;
point.timestamp =
toUint64.data + static_cast<uint64_t>(i) * (double(data->time_interval * 100) / data->dot_num); //unit for interval is 0.1 us = 100 ns
if(point.timestamp > 0)
if(point.timestamp > 0 && (point.x != 0 || point.y != 0 || point.z != 0))
{
buffer->push_back(point);
}
Expand Down
4 changes: 4 additions & 0 deletions code/save_laz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ std::optional<mandeye::LazStats> mandeye::saveLaz(const std::string& filename, L
min_y = std::min(min_y, y);
min_z = std::min(min_z, z);
}
if(buffer->empty())
{
min_x = min_y = min_z = max_x = max_y = max_z = 0.0;
}
}

std::cout << "processing: " << filename << "points " << buffer->size() << std::endl;
Expand Down
Loading