From cd71279466d80ada51941b802f0d5529d001c618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Fri, 3 Oct 2025 14:13:31 +0200 Subject: [PATCH] Use seconds in sensor_msgs::msg::LaserScan msg inside the test (#107) Signed-off-by: Alejandro Hernandez Cordero --- test/projection_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/projection_test.cpp b/test/projection_test.cpp index 3b7b472..1d41475 100644 --- a/test/projection_test.cpp +++ b/test/projection_test.cpp @@ -80,7 +80,7 @@ sensor_msgs::msg::LaserScan build_constant_scan(const ScanOptions & options) scan.angle_min = options.ang_min_; scan.angle_max = options.ang_max_; scan.angle_increment = options.ang_increment_; - scan.scan_time = static_cast(options.scan_time_.nanoseconds()); + scan.scan_time = static_cast(options.scan_time_.seconds()); scan.range_min = PROJECTION_TEST_RANGE_MIN; scan.range_max = PROJECTION_TEST_RANGE_MAX; uint32_t i = 0; @@ -90,7 +90,7 @@ sensor_msgs::msg::LaserScan build_constant_scan(const ScanOptions & options) } scan.time_increment = - static_cast(options.scan_time_.nanoseconds() / static_cast(i)); + static_cast(options.scan_time_.seconds() / static_cast(i)); return scan; }