From d7fd99943714990d775ffb37835956d50338114a Mon Sep 17 00:00:00 2001 From: Naoya Yamaguchi <708yamaguchi@gmail.com> Date: Mon, 26 Aug 2024 03:00:08 +0900 Subject: [PATCH] wait_interpolation() returns list of is_interpolating for all controllers --- skrobot/interfaces/ros/base.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skrobot/interfaces/ros/base.py b/skrobot/interfaces/ros/base.py index cf1c10a8..a1ddd189 100644 --- a/skrobot/interfaces/ros/base.py +++ b/skrobot/interfaces/ros/base.py @@ -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] @@ -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.