From eb555a4911e6eb12ebb7a67a6e09bb7340e490ac Mon Sep 17 00:00:00 2001 From: AndyZe Date: Thu, 8 Dec 2022 10:22:09 -0600 Subject: [PATCH] Require vel/accel limits in TOTG, don't use defaults --- .../src/time_optimal_trajectory_generation.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/moveit_core/trajectory_processing/src/time_optimal_trajectory_generation.cpp b/moveit_core/trajectory_processing/src/time_optimal_trajectory_generation.cpp index be6249411e7..0283ba50629 100644 --- a/moveit_core/trajectory_processing/src/time_optimal_trajectory_generation.cpp +++ b/moveit_core/trajectory_processing/src/time_optimal_trajectory_generation.cpp @@ -1016,10 +1016,9 @@ bool TimeOptimalTrajectoryGeneration::computeTimeStamps( if (!set_velocity_limit) { - max_velocity[j] = 1.0; - RCLCPP_WARN_STREAM_ONCE( - LOGGER, "Joint velocity limits are not defined. Using the default " - << max_velocity[j] << " rad/s. You can define velocity limits in the URDF or joint_limits.yaml."); + RCLCPP_ERROR(LOGGER, + "No velocity limit was defined! You can define velocity limits in the URDF or joint_limits.yaml"); + return false; } // ACCELERATION LIMIT @@ -1046,11 +1045,9 @@ bool TimeOptimalTrajectoryGeneration::computeTimeStamps( } if (!set_acceleration_limit) { - max_acceleration[j] = 1.0; - RCLCPP_WARN_STREAM_ONCE(LOGGER, - "Joint acceleration limits are not defined. Using the default " - << max_acceleration[j] - << " rad/s^2. You can define acceleration limits in the URDF or joint_limits.yaml."); + RCLCPP_ERROR(LOGGER, "No acceleration limit was defined! You can define acceleration limits in the URDF or " + "joint_limits.yaml"); + return false; } }