Use constructor of rclcpp::Time instead of conversion. (#91)

Signed-off-by: Guilherme Rodrigues <guilherme.rodrigues@ait.ac.at>
Co-authored-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
This commit is contained in:
AiVerisimilitude 2025-10-03 11:15:37 +02:00 committed by GitHub
parent eaf288827a
commit ae6e6740e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(