Skip to content

Commit

Permalink
Fixed PointCloud bug issue #30
Browse files Browse the repository at this point in the history
Fixed issue(2d scan time)
  • Loading branch information
cygbot committed Oct 18, 2022
1 parent b30e990 commit c71b753
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/cyglidar_pcl_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,20 @@ void cloudScatter_3D()
}
else
{
scan_3D.get()->points[BufferIndex].x = 0;
scan_3D.get()->points[BufferIndex].y = 0;
scan_3D.get()->points[BufferIndex].z = 0;
scan_3D.get()->points[BufferIndex].rgb = 0;
scan_3D.get()->points[BufferIndex].a = 0;
}
}
else
{
scan_3D.get()->points[BufferIndex].a = 0;
scan_3D.get()->points[BufferIndex].x = 0;
scan_3D.get()->points[BufferIndex].y = 0;
scan_3D.get()->points[BufferIndex].z = 0;
scan_3D.get()->points[BufferIndex].rgb = 0;
scan_3D.get()->points[BufferIndex].a = 0;
}
}
}
Expand Down Expand Up @@ -380,7 +388,8 @@ void running()
}
if (buffer_setup_2d)
{
last_time_laser = ros::Time::now();
current_time_laser = node->now() - rclcpp::Duration(0,15*1000*1000);
last_time_laser = current_time_laser;
bufferPtr_2D = &bufferPtr[0];
cloudScatter_2D(current_time_laser, last_time_laser, ANGLE_STEP_2D);
}
Expand Down

0 comments on commit c71b753

Please sign in to comment.