Ask Your Question
0

Action client wait_for_result() in python

asked 2020-03-29 15:14:55 -0600

thanasis_t gravatar image

Hello,

I would like to write an Action client in python without using the blocking function wait_for_result. From what I have seen this is possible in c++ in ROS and in python on ROS2. It is possible to do it in ROS melodic using python? Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-30 01:37:03 -0600

mgruhler gravatar image

Well, you obviously don't have to use a function provided by the API. You don't specify what you actually want to do, so the following is a little guess work.

But assuming you don't want to use a blocking call for getting the result, you can query the action server from a SimpleActionClient for its state using the getState function and, given that it is in an appropriate state, retrieve the result using getResult. There is no blocking call involved and you have full control. Check the API docs.

If you don't want to use the SimpleActionClient, look here for the respective functions.

If you want to do something else, please edit your question detailing what you want to achieve.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-03-29 15:14:55 -0600

Seen: 544 times

Last updated: Mar 30 '20