Ejemplo n.º 1
0
if __name__ == "__main__":

    cfg = config.load(sys.argv[1])

    # starting comm
    jdrc = comm.init(cfg, 'Stop')

    cameraC = jdrc.getCameraClient("Stop.CameraC")
    cameraL = jdrc.getCameraClient("Stop.CameraL")
    cameraR = jdrc.getCameraClient("Stop.CameraR")
    motors = jdrc.getMotorsClient("Stop.Motors")
    pose3d = jdrc.getPose3dClient("Stop.Pose3D")

    algorithm = MyAlgorithm(pose3d, cameraC, cameraL, cameraR, motors)

    app = QApplication(sys.argv)
    myGUI = MainWindow()
    myGUI.setMotors(motors)
    myGUI.setCameraC(cameraC)
    myGUI.setCameraL(cameraL)
    myGUI.setCameraR(cameraR)
    myGUI.setPose3D(pose3d)
    myGUI.setAlgorithm(algorithm)
    myGUI.show()

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

    sys.exit(app.exec_())
Ejemplo n.º 2
0
import sys
from gui.GUI import MainWindow
from gui.threadGUI import ThreadGUI
from MyAlgorithm import MyAlgorithm
from PyQt5.QtWidgets import QApplication
from interfaces.camera import ListenerCamera
from interfaces.pose3d import ListenerPose3d
from interfaces.motors import PublisherMotors

if __name__ == "__main__":

    camera = ListenerCamera("/F1ROS/cameraL/image_raw")
    motors = PublisherMotors("/F1ROS/cmd_vel", 4, 0.3)
    pose3d = ListenerPose3d("/F1ROS/odom")
    pose3dphantom = ListenerPose3d("/F1ROS_phantom/odom")
    algorithm = MyAlgorithm(camera, motors, pose3d)

    app = QApplication(sys.argv)
    myGUI = MainWindow()
    myGUI.setCamera(camera)
    myGUI.setMotors(motors)
    myGUI.setPose3D(pose3d, pose3dphantom)
    myGUI.setAlgorithm(algorithm)
    myGUI.show()

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

    sys.exit(app.exec_())
Ejemplo n.º 3
0
    cfg = config.load(sys.argv[1])

    #starting comm
    jdrc= comm.init(cfg, 'Stop')

    cameraC = jdrc.getCameraClient("Stop.CameraC")
    cameraL = jdrc.getCameraClient("Stop.CameraL")
    cameraR = jdrc.getCameraClient("Stop.CameraR")
    motors = jdrc.getMotorsClient ("Stop.Motors")
    pose3d = jdrc.getPose3dClient("Stop.Pose3D")
    
    algorithm=MyAlgorithm(pose3d, cameraC, cameraL, cameraR, motors)

    app = QApplication(sys.argv)
    myGUI = MainWindow()
    myGUI.setMotors(motors)
    myGUI.setCameraC(cameraC)
    myGUI.setCameraL(cameraL)
    myGUI.setCameraR(cameraR)
    myGUI.setPose3D(pose3d)
    myGUI.setAlgorithm(algorithm)
    myGUI.show()


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


    sys.exit(app.exec_())
Ejemplo n.º 4
0
    cfg = config.load(sys.argv[1])

    # starting comm
    jdrc = comm.init(cfg, 'Introrob')

    cameraCli = jdrc.getCameraClient("Introrob.Camera")
    camera = CameraFilter(cameraCli)
    navdata = jdrc.getNavdataClient("Introrob.Navdata")
    pose = jdrc.getPose3dClient("Introrob.Pose3D")
    cmdvel = jdrc.getCMDVelClient("Introrob.CMDVel")
    extra = jdrc.getArDroneExtraClient("Introrob.Extra")

    algorithm = MyAlgorithm(camera, navdata, pose, cmdvel, extra)

    app = QApplication(sys.argv)
    frame = MainWindow()
    frame.setCamera(camera)
    frame.setNavData(navdata)
    frame.setPose3D(pose)
    frame.setCMDVel(cmdvel)
    frame.setExtra(extra)
    frame.setAlgorithm(algorithm)
    frame.show()

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

    sys.exit(app.exec_())
Ejemplo n.º 5
0
import signal

signal.signal(signal.SIGINT, signal.SIG_DFL)

if __name__ == '__main__':
    ic = EasyIce.initialize(sys.argv)
    camera = CameraClient(ic, "UAVViewer.Camera", True)
    navdata = NavDataClient(ic, "UAVViewer.Navdata", True)
    pose = Pose3DClient(ic, "UAVViewer.Pose3D", True)
    cmdvel = CMDVel(ic, "UAVViewer.CMDVel")
    extra = Extra(ic, "UAVViewer.Extra")


    app = QApplication(sys.argv)
    frame = MainWindow()
    frame.setCamera(camera)
    frame.setNavData(navdata)
    frame.setPose3D(pose)
    frame.setCMDVel(cmdvel)
    frame.setExtra(extra)
    frame.show()
    
    

    t2 = ThreadGUI(frame)  
    t2.daemon=True
    t2.start()
    
    sys.exit(app.exec_()) 
Ejemplo n.º 6
0
from gui.threadGUI import ThreadGUI
from MyAlgorithm import MyAlgorithm
from PyQt5.QtWidgets import QApplication
from interfaces.camera import ListenerCamera
from interfaces.pose3d import ListenerPose3d
from interfaces.motors import PublisherMotors

if __name__ == "__main__":

    camera = ListenerCamera("/F1ROS/cameraL/image_raw")
    motors = PublisherMotors("/F1ROS/cmd_vel", 4, 0.3)
    pose3d = ListenerPose3d("/F1ROS/odom")
    pose3dphantom = ListenerPose3d("/F1ROS_phantom/odom")
    algorithm=MyAlgorithm(camera, motors, pose3d)

    app = QApplication(sys.argv)
    myGUI = MainWindow()
    myGUI.setCamera(camera)
    myGUI.setMotors(motors)
    myGUI.setPose3D(pose3d, pose3dphantom)
    myGUI.setAlgorithm(algorithm)
    myGUI.show()


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


    sys.exit(app.exec_())