Esempio n. 1
0
# Agregar al vector los nombres que el suusario selecciona segun el ID se deben agregar 8 camaras, se puede repetirclear
nombres = []
i = 0
while i < 2:
    selecID = input("Selccione el ID para agregar a la visualizacion: ")
    newName = name + "_" + selecID
    nombres.append(newName)
    #print("La lista es: " + newName)
    i += 1

while True:
    vecImgs = []

    ## cam 1
    cam.setNameRACamera(nombres[0])
    frame1 = cam.operator()
    salida1.write(frame1)
    if isinstance(frame1, np.ndarray):
        width, height = frame1.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame1)

    ## cam 2
    cam.setNameRACamera(nombres[1])
    frame2 = cam.operator()
    salida2.write(frame2)
    if isinstance(frame2, np.ndarray):
        width, height = frame2.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame2)
Esempio n. 2
0
# create the camera
name = "demo1_MapaSemantico"+str(randint(0, 99))  # rand in the range 0 to 99;
cam1 = MSScam(name, 640, 480, 10, 0, 10, 0, 10, 123, 0.0)
cam1.addTosimulator(cli.sock, ipAddress, port)

# Crear la misma camara con parametros dienticos
name = "demo1_MapaSemantico"+str(randint(0, 99))  # rand in the range 0 to 99;
cam2 = MSScam(name, 640, 480, 10, 0, 10, 0, 10, 123, 0.0)
cam2.addToSimulatorMapaSemantico(cli.sock, ipAddress, port)

while True:
    vecImgs=[]

    ## cam 1
    frame1=cam1.operator()
    if isinstance(frame1,np.ndarray):
        width, height = frame1.shape[:2]
        if width>0 and height>0:
            vecImgs.append(frame1)

    ## cam 2
    frame2=cam2.operator()
    if isinstance(frame2,np.ndarray):

        width, height = frame2.shape[:2]
        if width>0 and height>0:
            vecImgs.append(frame2)

    ## generate video wall image
    videowall = dibujarCanvas.makeCanvas(vecImgs, 960, 2)
Esempio n. 3
0
print("Numero de camaras Disponibles " + str(numCam))

if numCam == 0:
    print("No hay camaras moviles en el simulador")
else:
    i = 0
    while i < numCam:
        print("Acceder a las camaras con el nombre: " + name + "_" + str(i))
        i += 1

while True:
    vecImgs = []

    ## cam 1
    cam.setNameRACamera(name + "_0")
    frame1 = cam.operator()
    if isinstance(frame1, np.ndarray):
        width, height = frame1.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame1)

    ## cam 2
    cam.setNameRACamera(name + "_1")
    frame2 = cam.operator()
    if isinstance(frame2, np.ndarray):
        width, height = frame2.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame2)

    ## cam 3
    cam.setNameRACamera(name + "_2")
Esempio n. 4
0
# Agregar al vector los nombres que el suusario selecciona segun el ID se deben agregar 8 camaras, se puede repetirclear
nombres = []
i = 0
while i < 8:
    selecID = input("Selccione el ID para agregar a la visualizacion: ")
    newName = name + "_" + selecID
    nombres.append(newName)
    #print("La lista es: " + newName)
    i += 1

while True:
    vecImgs = []

    ## cam 1
    cam.setNameRACamera(nombres[0])
    frame1 = cam.operator()
    if isinstance(frame1, np.ndarray):
        width, height = frame1.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame1)

    ## cam 2
    cam.setNameRACamera(nombres[1])
    frame2 = cam.operator()
    if isinstance(frame2, np.ndarray):
        width, height = frame2.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame2)

    ## cam 3
    cam.setNameRACamera(nombres[2])
Esempio n. 5
0
#cam5 = MSScam(name, 320, 240, 10, 29.0, -5.95, 26.79, 10.0, -90.0, 0.0) # EPS LITE
cam5 = MSScam(name, 320, 240, 10, -114.5, 13.7, -31.89, 10.0, 60.0, 0.0)
cam5.addTosimulator(cli.sock, ipAddress, port)

## create camera 6
name = "demo1_test" + str(randint(0, 999))  ## rand in the range 0 to 999;
#cam6 = MSScam(name, 320, 240, 10, 25.31, -6.6, 9.87, 10.0, -90.0, 0.0) # EPS LITE
cam6 = MSScam(name, 320, 240, 10, -171.9, 5.9, -26.5, 3.5, 45.0, 0.0)
cam6.addTosimulator(cli.sock, ipAddress, port)

## preview cameras
while True:
    vecImgs = []

    ## cam 1
    frame1 = cam1.operator()
    if isinstance(frame1, np.ndarray):
        width, height = frame1.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame1)

    ## cam 2
    frame2 = cam2.operator()
    if isinstance(frame2, np.ndarray):
        width, height = frame2.shape[:2]
        if width > 0 and height > 0:
            vecImgs.append(frame2)

    ## cam 3
    frame3 = cam3.operator()
    if isinstance(frame3, np.ndarray):