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

Add the possibility to wait_for_robot to connect #7

Open
gonzalocasas opened this issue Feb 17, 2021 · 0 comments
Open

Add the possibility to wait_for_robot to connect #7

gonzalocasas opened this issue Feb 17, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@gonzalocasas
Copy link
Contributor

Summary

As an RRC user, I want be able to send an instruction even before the robot has connected, and have the code wait until robot connection to execute it so that I can simplify the client code.

Details

Will this change the current API? How?
One option would be to have a method abb.wait_for_robot() so that client code could be:

ros = RosClient()
ros.run()

abb = AbbClient(ros,'/')
abb.wait_for_robot()
current_pose = abb.send_and_wait(GetFrame())

Additionally, wait_for_robot could take a timeout parameter, but not raise exceptions if it's expired, just like the wait methods of threading.Event, eg:

ros = RosClient()
ros.run()

abb = AbbClient(ros,'/')

while True:
   if not abb.wait_for_robot(timeout=10):
      print('Robot not connected, will retry...')
      continue

   current_pose = abb.send_and_wait(GetFrame())
@gonzalocasas gonzalocasas changed the title Add the possibility to to wait_for_robot to connect Add the possibility to wait_for_robot to connect Mar 29, 2021
@gonzalocasas gonzalocasas added the enhancement New feature or request label Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant