File tree Expand file tree Collapse file tree
Industrial/ros2_SimRealRobotControl_gz/ros2srrc_execution/python/robot Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ def __init__(self):
6262
6363 print ("[CLIENT - robot.py]: Initialising ROS2 /RobMove Action Client!" )
6464 print ("[CLIENT - robot.py]: Waiting for /Robmove ROS2 ActionServer to be available..." )
65- self ._action_client .wait_for_server ()
65+ while not self ._action_client .wait_for_server (timeout_sec = 1.0 ):
66+ rclpy .spin_once (self )
6667 print ("[CLIENT - robot.py]: /Robmove ACTION SERVER detected, ready!" )
6768 print ("" )
6869
@@ -115,7 +116,8 @@ def __init__(self):
115116
116117 print ("[CLIENT - robot.py]: Initialising ROS2 /Move Action Client!" )
117118 print ("[CLIENT - robot.py]: Waiting for /Move ROS2 ActionServer to be available..." )
118- self ._action_client .wait_for_server ()
119+ while not self ._action_client .wait_for_server (timeout_sec = 1.0 ):
120+ rclpy .spin_once (self )
119121 print ("[CLIENT - robot.py]: /Move ACTION SERVER detected, ready!" )
120122 print ("" )
121123
You can’t perform that action at this time.
0 commit comments