Define states in smach_ros with topics

asked 2017-03-02 12:54:53 -0500

Hi everyone,

I am working with smach_ros and I have done a .cpp that reads the keyboard and allows me to change the state. However, the function monitorState only allows me to return a bool value (True or False) and I need more options since there are some states that have five possible transitions.

Here I give an example of what I have and what I want.

def monitor_prueba(ud, msg): if Bool.data == 1: return False elif Bool.data == 2: return True

def monitor_prueba(ud, msg): if Bool.data == 1: return OTHERVALUE elif Bool.data == 2: return OTHERVALUE

Thank you.

edit retag flag offensive close merge delete