Пример #1
0
class GatePath(object):
    def __init__(self):
        print '<===INIT GATE _PATH===>'
        self.aicontrol = AIControl()
        self.gate = Gate()
        self.path = Path()

    def run(self):
        auv = self.aicontrol
        self.gate.run()
        #auv.driveY(0.5)
        self.path.run()
Пример #2
0
    elif reset >= 10:
        os.system('rosnode kill /main_ai')


if __name__ == '__main__':
    rospy.init_node('main_ai')
    rospy.Subsciber('/planner_switch', Bool, getSwitchState, queue_size=1)
    gate = Gate()
    path1 = Path()
    shoot_craps = ShootCraps()
    path2 = Path()
    slots = Slots()
    roulette = Roulette()
    cash_in = CashIn()

    gate.run()

    path1.run()
    if path1.failed:
        auv.turnAbs(cons.SC_DEGREES)

    shoot_craps.run()

    path2.run()
    if path2.failed:
        auv.turnAbs(cons.SLOTS_DEGREES)

    slots.run()

    roulette.run()