# This is to be updated
        navigation_client = NavigateToPoseActionClient()
        print("Subscribed To Move Base Client, Starting Application")

        app = QApplication(sys.argv)
        myGUI = MainWindow()

        grid = Grid(myGUI)

        vel = Velocity(0.0, 0.0, motors.getMaxV(), motors.getMaxW())
        sensor = Sensor(grid, pose3d, True)
        sensor.setGetPathSignal(myGUI.getPathSig)

        myGUI.setVelocity(vel)
        myGUI.setGrid(grid)
        myGUI.setSensor(sensor)
        algorithm = MyAlgorithm(grid, sensor, vel, navigation_client)
        myGUI.setAlgorithm(algorithm)
        myGUI.show()

        removeMapFromArgs()

        t1 = ThreadMotors(motors, vel)
        t1.daemon = True
        t1.start()
        t2 = ThreadGUI(myGUI)
        t2.daemon = True
        t2.start()

        sys.exit(app.exec_())
Beispiel #2
0
    removeMapFromArgs()

    cfg = config.load(sys.argv[1])
    #starting comm
    jdrc = comm.init(cfg, 'TeleTaxi')

    motors = jdrc.getMotorsClient("TeleTaxi.Motors")
    pose = jdrc.getPose3dClient("TeleTaxi.Pose3D")

    vel = Velocity(0, 0, motors.getMaxV(), motors.getMaxW())

    frame.setVelocity(vel)
    sensor = Sensor(grid, pose, True)
    sensor.setGetPathSignal(frame.getPathSig)
    frame.setGrid(grid)
    frame.setSensor(sensor)
    algorithm = MyAlgorithm(grid, sensor, vel)
    frame.setAlgorithm(algorithm)
    frame.show()

    t1 = ThreadMotors(motors, vel)
    t1.daemon = True
    t1.start()

    t2 = ThreadGUI(frame)
    t2.daemon = True
    t2.start()

    sys.exit(app.exec_())
        sys.exit(-1)

    app = QApplication(sys.argv)
    frame = MainWindow()
    grid = Grid(frame)

    removeMapFromArgs()
    ic = EasyIce.initialize(sys.argv)
    pose = Pose3D (ic, "TeleTaxi.Pose3D")
    motors = Motors (ic, "TeleTaxi.Motors")

    vel = Velocity(0, 0, motors.getMaxV(), motors.getMaxW())

    frame.setVelocity(vel)
    sensor = Sensor(grid, pose, True)
    sensor.setGetPathSignal(frame.getPathSig)
    frame.setGrid(grid)
    frame.setSensor(sensor)
    algorithm = MyAlgorithm(grid, sensor, vel)
    frame.setAlgorithm(algorithm)
    frame.show()
    
    t1 = ThreadMotors(motors, vel)
    t1.daemon = True
    t1.start()

    t2 = ThreadGUI(frame)  
    t2.daemon = True
    t2.start()
    
    sys.exit(app.exec_())