Ask Your Question

Can a rosnode have a global state of it's own ?

asked 2017-09-13 02:47:02 -0500

amarbanerjee23 gravatar image

Hi, I wish to create a statemachine for a rosnode. However I want the state machine to be broken into parts and execute these parts independently. E.g. Initial State of the rosnode is A A Service S1 is called Then tranistion happens A->B. Now the global state of the node is B Then when another service/action is called tranistion happens B->C , with the global state as C, and so on.

So over all my state machine is A->B->C. But the parts A->B, B->C are based on triggers for Services and Actions. And also at a given point, the rosnode has a global state based on these transitions. Can smach help me to get it done ?

edit retag flag offensive close merge delete


Hi @gvdhoorn@knxa !! Sorry to pull you into this question. But as I really had some good comments from you, I thought I'll get you help over here too. What do think about this question ? A ros node can be seen as a controller node with a state. I am trying to get the node state at any moment.

amarbanerjee23 gravatar image amarbanerjee23  ( 2017-09-14 03:57:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-11-06 04:04:38 -0500

knxa gravatar image

updated 2017-11-06 04:05:34 -0500

Can smach help me to get it done

I guess that is exactly what SMACH is. Or what SMACH_ROS is, since there you get SMACH states that wraps interaction to an action server or a service, so you can create arbitrary coordination of tasks, e.g.:

'A' must happen before 'B' and if 'A' fails then 'B' is not executed, etc...

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



Asked: 2017-09-13 02:47:02 -0500

Seen: 105 times

Last updated: Nov 06 '17