Skip to content

Commit

Permalink
Use constructor of rclcpp::Time instead of conversion.
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Rodrigues <[email protected]>
  • Loading branch information
AiVerisimilitude committed Dec 15, 2023
1 parent 3d913f6 commit b47a3f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/laser_geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ void LaserProjection::transformLaserScanToPointCloud_(
double range_cutoff,
int channel_options)
{
rclcpp::Time start_time = scan_in.header.stamp;
rclcpp::Time end_time = scan_in.header.stamp;
rclcpp::Time start_time(scan_in.header.stamp, RCL_ROS_TIME);
rclcpp::Time end_time(scan_in.header.stamp, RCL_ROS_TIME);
// TODO(anonymous): reconcile all the different time constructs
if (!scan_in.ranges.empty()) {
end_time = start_time + rclcpp::Duration::from_seconds(
Expand Down

0 comments on commit b47a3f9

Please sign in to comment.