From 6890d6e48e9416f60e85eee393a892c463981348 Mon Sep 17 00:00:00 2001 From: Lennart Nachtigall Date: Wed, 3 Jul 2024 16:34:14 +0200 Subject: [PATCH] Fix goal time violated See https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/882 --- joint_trajectory_controller/src/joint_trajectory_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joint_trajectory_controller/src/joint_trajectory_controller.cpp b/joint_trajectory_controller/src/joint_trajectory_controller.cpp index 218c9e1c5c..15bd053e82 100644 --- a/joint_trajectory_controller/src/joint_trajectory_controller.cpp +++ b/joint_trajectory_controller/src/joint_trajectory_controller.cpp @@ -236,7 +236,7 @@ controller_interface::return_type JointTrajectoryController::update( // time_difference is // - negative until first point is reached // - counting from zero to time_from_start of next point - double time_difference = time.seconds() - segment_time_from_start.seconds(); + const double time_difference = time_data.uptime.seconds() - segment_time_from_start.seconds(); bool tolerance_violated_while_moving = false; bool outside_goal_tolerance = false; bool within_goal_time = true;