From 9e97d9f91911a556b72ec5249df2deb303415973 Mon Sep 17 00:00:00 2001 From: "Felix Exner (fexner)" Date: Thu, 28 Nov 2024 21:50:17 +0100 Subject: [PATCH] Update joint_trajectory_controller/test/test_trajectory_actions.cpp Co-authored-by: Sai Kishor Kothakota --- joint_trajectory_controller/test/test_trajectory_actions.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/joint_trajectory_controller/test/test_trajectory_actions.cpp b/joint_trajectory_controller/test/test_trajectory_actions.cpp index 8f45fb66af..d4979deef8 100644 --- a/joint_trajectory_controller/test/test_trajectory_actions.cpp +++ b/joint_trajectory_controller/test/test_trajectory_actions.cpp @@ -84,10 +84,9 @@ class TestTrajectoryActions : public TrajectoryControllerTest // controller hardware cycle update loop auto clock = rclcpp::Clock(RCL_STEADY_TIME); auto now_time = clock.now(); - auto start_time = now_time; - auto last_time = start_time; + auto last_time = now_time; rclcpp::Duration wait = rclcpp::Duration::from_seconds(2.0); - auto end_time = start_time + wait; + auto end_time = last_time + wait; while (clock.now() < end_time) { now_time = clock.now();