Using custom outcomes in C++ and SMACH

asked 2013-11-07 05:22:46 -0600

updated 2014-01-28 17:18:28 -0600

ngrennan gravatar image

I would like to use SMACH as my behavior state machine engine. However, I also prefer to write the states/behaviors in C++. The tutorials show smach connecting to C++ simple action states, but they always seem to return succeeded as an outcome. My question is this: how can I use SMACH with a C++ actionlib server such that the server can return more varied outcomes?

For instance, I might have a state that collects data until it runs out of disk space or otherwise finishes. In that case, I might wish to have an outcome called 'full' and another called 'succeeded'. My state machine would be able to branch to different following states, based on these outcomes (for instance go to another place and gather more data). How would I setup these custom outcomes with a C++ action_server and smach?

Thanks in Advance

edit retag flag offensive close merge delete

Comments

Can you please let me know if you found some answer for this? I am looking for the same... Thank you.....

ghkraju gravatar image ghkraju  ( 2017-02-27 09:22:43 -0600 )edit