From 338635614a772680fb6da416ca31bf368481e3cf Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sat, 16 Jul 2016 16:58:39 +0900 Subject: [PATCH] always add current poisition as the first point in trajectory points --- 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 99b2171..4b0366a 100644 --- a/src/joint_trajectory_action/joint_trajectory_action.py +++ b/src/joint_trajectory_action/joint_trajectory_action.py @@ -361,7 +361,7 @@ def _on_trajectory_action(self, goal): dimensions_dict = self._determine_dimensions(trajectory_points) - if num_points == 1: + if num_points >= 1 and trajectory_points[0].time_from_start.to_sec() > 0: # Add current position as trajectory point first_trajectory_point = JointTrajectoryPoint() first_trajectory_point.positions = self._get_current_position(joint_names)