Updating robot arm state machine.