Skip to content

Commit 3386356

Browse files
committed
always add current poisition as the first point in trajectory points
1 parent aea70d9 commit 3386356

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/joint_trajectory_action/joint_trajectory_action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def _on_trajectory_action(self, goal):
361361

362362
dimensions_dict = self._determine_dimensions(trajectory_points)
363363

364-
if num_points == 1:
364+
if num_points >= 1 and trajectory_points[0].time_from_start.to_sec() > 0:
365365
# Add current position as trajectory point
366366
first_trajectory_point = JointTrajectoryPoint()
367367
first_trajectory_point.positions = self._get_current_position(joint_names)

0 commit comments

Comments
 (0)