Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support None for no timeout in line with rospy.wait_for_message #173

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions actionlib/src/actionlib/action_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,9 @@ def wait_for_action_server_to_start(self, timeout=rospy.Duration(0.0)):
## a connection, thus, risking the first few goals to be dropped. This call lets
## the user wait until the network connection to the server is negotiated
def wait_for_server(self, timeout=rospy.Duration(0.0)):
if timeout is None:
timeout = rospy.Duration(0.0)

started = False
timeout_time = rospy.get_rostime() + timeout
while not rospy.is_shutdown():
Expand Down
3 changes: 3 additions & 0 deletions actionlib/src/actionlib/simple_action_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def send_goal_and_wait(self, goal, execute_timeout=rospy.Duration(), preempt_tim
## @param timeout Max time to block before returning. A zero timeout is interpreted as an infinite timeout.
## @return True if the goal finished. False if the goal didn't finish within the allocated timeout
def wait_for_result(self, timeout=rospy.Duration()):
if timeout is None:
timeout = rospy.Duration()

if not self.gh:
rospy.logerr("Called wait_for_result when no goal exists")
return False
Expand Down