From c06eb886054e3a3a97e16f1caf96d40163889f83 Mon Sep 17 00:00:00 2001 From: Shingo Kitagawa Date: Wed, 17 Jul 2019 21:03:58 +0900 Subject: [PATCH] set current velocities for first_trajectory_point --- src/joint_trajectory_action/joint_trajectory_action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joint_trajectory_action/joint_trajectory_action.py b/src/joint_trajectory_action/joint_trajectory_action.py index 0941230..2fe87af 100644 --- a/src/joint_trajectory_action/joint_trajectory_action.py +++ b/src/joint_trajectory_action/joint_trajectory_action.py @@ -411,7 +411,7 @@ def _on_trajectory_action(self, goal): # To preserve desired velocities and accelerations, copy them to the first # trajectory point if the trajectory is only 1 point. if dimensions_dict['velocities']: - first_trajectory_point.velocities = deepcopy(trajectory_points[0].velocities) + first_trajectory_point.velocities = self._get_current_velocities(joint_names) if dimensions_dict['accelerations']: first_trajectory_point.accelerations = deepcopy(trajectory_points[0].accelerations) first_trajectory_point.time_from_start = rospy.Duration(0)