#include "Behaviors/StateMachine.h"

$nodeclass ZakTest : VisualRoutinesStateNode {

  $nodeclass MyPilotReq : PilotNode($, PilotTypes::setVelocity) : doStart {
    pilotreq.forwardSpeed = 50;
    pilotreq.turnSpeed = 0.1;
  }

  $nodeclass MyStopReq : VisualRoutinesStateNode : doStart {
    pilot->cancelVelocity();
    cout << "Cancelled velocity." << endl;
  }

  $setupmachine{
    StateNode =N=> {makereq, stopreq}

    makereq: MyPilotReq =PILOT=> SpeechNode($, "Done piloting")

    stopreq: StateNode =T(10000)=> MyStopReq
  }

}

REGISTER_BEHAVIOR(ZakTest);

