Skip to content

Commit 6668383

Browse files
author
cobot
committed
x
1 parent e22e6f7 commit 6668383

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

codebotler.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,7 @@ def main():
325325
parser.add_argument('--timeout', type=int, help='Code generation timeout in seconds', default=20)
326326
parser.add_argument('--transcription-pipe', type=Path, help='Pipe from which to read audio transcriptions', default='/tmp/audio_pipe')
327327

328-
if ros_available:
329-
args = parser.parse_args(rclpy_instance.utilities.remove_ros_args())
330-
else:
331-
args = parser.parse_args()
328+
args = parser.parse_args()
332329

333330
robot_available = args.robot
334331
code_timeout = args.timeout

robot_interface/src/robot_client_interface.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,16 @@ def __init__(self):
6464
self.get_reachable_locations_around_object_client.wait_for_server()
6565
print("======= Connected to robot action servers =======")
6666

67-
@staticmethod
68-
def _handle_client(client, goal, action_name):
67+
def _handle_client(self, client, goal, action_name):
6968
goal_handle = client.send_goal_async(goal)
70-
rclpy.spin_until_future_complete(None, goal_handle)
69+
rclpy.spin_until_future_complete(self, goal_handle)
7170

7271
goal_handle = goal_handle.result()
7372
if not goal_handle.accepted:
7473
raise Exception(f"{action_name}() goal was rejected!")
7574

7675
result_future = goal_handle.get_result_async()
77-
rclpy.spin_until_future_complete(None, result_future)
76+
rclpy.spin_until_future_complete(self, result_future)
7877

7978
result = result_future.result()
8079
if result.status == GoalStatus.STATUS_CANCELED:

0 commit comments

Comments
 (0)