from cozmo_fsm import *

class Lab5(StateMachineProgram):
    def __init__(self):
        super().__init__(worldmap_viewer=True,
                         path_viewer=True,
                         particle_viewer=True,
                         landmark_test=SLAMSensorModel.is_cube)

    destination = Pose(300,0,0,angle_z=degrees(180))

    def setup(self):
        """
            StateNode() =TM=> PilotToPose(self.destination) =C=> Say('done')
        """
        
        # Code generated by genfsm on Fri Feb 16 05:06:19 2018:
        
        statenode1 = StateNode() .set_name("statenode1") .set_parent(self)
        pilottopose1 = PilotToPose(self.destination) .set_name("pilottopose1") .set_parent(self)
        say1 = Say('done') .set_name("say1") .set_parent(self)
        
        textmsgtrans1 = TextMsgTrans() .set_name("textmsgtrans1")
        textmsgtrans1 .add_sources(statenode1) .add_destinations(pilottopose1)
        
        completiontrans1 = CompletionTrans() .set_name("completiontrans1")
        completiontrans1 .add_sources(pilottopose1) .add_destinations(say1)
        
        return self
