diff --git a/arbotix_python/src/arbotix_python/follow_controller.py b/arbotix_python/src/arbotix_python/follow_controller.py index 775193b..68aa23f 100644 --- a/arbotix_python/src/arbotix_python/follow_controller.py +++ b/arbotix_python/src/arbotix_python/follow_controller.py @@ -136,9 +136,9 @@ def executeTrajectory(self, traj): desired = [ point.positions[k] for k in indexes ] # two modes: First the transition time / total duration is specified that implies joint velocities (synchronous transition) - if point.time_from_start.secs > 0 or point.time_from_start.nsecs > 0: + if point.time_from_start.secs >= 0 or point.time_from_start.nsecs >= 0: sync_transition = True - if len(point.velocities)>0: + if len(point.velocities)>0 and not all(v == 0 for v in point.velocities): rospy.logwarn("Found both a nonzero time_from_start and individual joint velocities. Chosing synchronous transition w.r.t. time_from_start.") endtime = start + point.time_from_start else: # second mode: command user-defined velocity profile until desired position is reached (consider joints separately)