Hi all, I want to execute a self transition in which the initial state is same as the final state STATE_A -----> STATE_A However, when the smach.execute() is called, it continuously executes the transition in an infinite loop. My main main condition is that I need to do a self transition.
Please suggest any suitable techniques to do so. Thanks and Cheers !!
Originally posted by amarbanerjee23 on ROS Answers with karma: 5 on 2017-09-07
Post score: 0
Original comments
Comment by knxa on 2017-09-10:
Not sure what you are trying to do. If you at the end enter STATE_A again with the same input data as the first time, wouldn't you expect the state machine execution to loop forever?
Comment by amarbanerjee23 on 2017-09-12:
Hi @knxa. The problem I am facing need to have a self transition from initial state A to final state A. But behaviour of initial state A is different to final state A. I wish to use the concept of entry and exit actions to create behaviour for transitions and not states.
Hope I was able to explain.
Comment by gvdhoorn on 2017-09-12:
I think I believe I agree with @knxa: if the behaviour is different, why are you trying to reuse the state?
Comment by amarbanerjee23 on 2017-09-12:
Hi @gvdhoorn, I see what you are saying, but I want to reuse the state but with a different action behaviour. E.g. A->B is a transition T1 having some actions, while A->A is another transition T2 with a different action. I want to associate the behaviour with the transition not the state.