Skip to content

Commit

Permalink
Merge pull request #387 from 708yamaguchi/wait-interpolation-return
Browse files Browse the repository at this point in the history
wait_interpolation() returns list of is_interpolating for all controllers
  • Loading branch information
iory committed Aug 26, 2024
2 parents 7f1e8c6 + d7fd999 commit afbb0c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions skrobot/interfaces/ros/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ def wait_interpolation(self, controller_type=None, timeout=0):
Returns
-------
list[bool]
return values are a list of is_interpolating for all controllers.
if all interpolation has stopped, return True.
"""
if controller_type:
controller_actions = self.controller_table[controller_type]
Expand All @@ -604,8 +604,9 @@ def wait_interpolation(self, controller_type=None, timeout=0):
for action in controller_actions:
# TODO(simultaneously wait_for_result)
action.wait_for_result(timeout=rospy.Duration(timeout))
# TODO(Fix return value)
return True
is_interpolatings = map(
lambda action: action.is_interpolating(), controller_actions)
return list(is_interpolatings)

def angle_vector_duration(self, start_av, end_av, controller_type=None):
"""Calculate maximum time to reach goal for all joint.
Expand Down

0 comments on commit afbb0c2

Please sign in to comment.