Ask Your Question
2

How do I create a callback-based actionlib client in python?

asked 2018-05-23 15:05:00 -0500

dsoike gravatar image

The actionlib tutorial on Writing a Callback Based Simple Action Client shows how to do it in C++, but there isn't a tutorial for Python.

The Writing a Simple Action Client (Python) tutorial only demonstrates synchronous behavior with client.wait_for_server(), which does not allow for actionlib feedback.

A simple example would be much appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-23 16:14:07 -0500

NickKnack15 gravatar image

updated 2018-05-23 16:43:18 -0500

Hello there!

I think I have something just for you. I created a simple demo on how to create a call-back based actionlib implementation for Python 2.7. You can find the demo here python-actionlib-demo!

When you build the package and run the nodes, there are 2 actions that can be triggered and cancelled independently of each other. This shows how easy it is to leverage the asynchronous capability of actionlib without dealing with the threading overhead in Python 2.7!

Hope this helps!

edit flag offensive delete link more

Comments

1

Can you please update your answer with a minimum working example? This way it'll be self-contained.

jayess gravatar imagejayess ( 2018-05-23 18:33:24 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2018-05-23 15:05:00 -0500

Seen: 620 times

Last updated: May 23 '18