state machine without ROS messaging