Skip to content

Commit

Permalink
fix(velodyne): reset pointcloud incl. width/height, not just points b…
Browse files Browse the repository at this point in the history
…uffer

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
  • Loading branch information
mojomex committed Nov 5, 2024
1 parent 18af521 commit 96b216e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int Vlp16Decoder::pointsPerPacket()

void Vlp16Decoder::reset_pointcloud(size_t n_pts, double time_stamp)
{
scan_pc_->points.clear();
scan_pc_->clear();
max_pts_ = n_pts * pointsPerPacket();
scan_pc_->points.reserve(max_pts_);
reset_overflow(time_stamp); // transfer existing overflow points to the cleared pointcloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ int Vlp32Decoder::pointsPerPacket()

void Vlp32Decoder::reset_pointcloud(size_t n_pts, double time_stamp)
{
// scan_pc_.reset(new NebulaPointCloud);
scan_pc_->points.clear();
scan_pc_->clear();
max_pts_ = n_pts * pointsPerPacket();
scan_pc_->points.reserve(max_pts_);
reset_overflow(time_stamp); // transfer existing overflow points to the cleared pointcloud
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ int Vls128Decoder::pointsPerPacket()

void Vls128Decoder::reset_pointcloud(size_t n_pts, double time_stamp)
{
// scan_pc_.reset(new NebulaPointCloud);
scan_pc_->points.clear();
scan_pc_->clear();
max_pts_ = n_pts * pointsPerPacket();
scan_pc_->points.reserve(max_pts_);
reset_overflow(time_stamp); // transfer existing overflow points to the cleared pointcloud
Expand Down

0 comments on commit 96b216e

Please sign in to comment.