(found, value) = filereader.getProperty("SIMULATOR_PORT") if found: port = int(value) # initialize client cli = MSSclient() cli.connectTosimulator(ipAddress, port, sock) # create the camera #cam = MSScam("demo2_test", 640, 480, 10, posX, posY, posZ, rotX, rotY, rotZ) cam = MSScam("demo2_test1", 640, 480, 10, 69.7, 10.8, -80.1, 5, 8.5, 0.0) #cam = MSScam("demo2_test2", 640, 480, 10, 63, 10, -80, 0.0, 0.0, 0.0) # add the camera to the simulator cam.addTosimulator(cli.sock, ipAddress, port) # preview the camera for 10 secs cam.preview(10) # time in seconds # wait 1 sec before closing this demo time.sleep(1) # time in seconds # unregistering camera cam.removeFromSimulator() # save camera details cam.saveTofile("./resources/camera1new.txt") # load camera from file and preview cam1 = MSScam("./resources/camera1new.txt")
print("DEMO: VIDEO WALL\n") print("This demo test basic functionality:\n") print(" (1) connects the client to the simulator\n") print(" (2) creates 6 cameras\n") print(" (3) registers the cameras in the simulator\n") print(" (4) previews the cameras in a video wall\n") ##initialize client cli = MSSclient() cli.connectTosimulator(ipAddress, port, sock) ##create camera 1 name = "demo1_test" + str(randint(0, 999)) ## rand in the range 0 to 999; #cam1 = MSScam(name, 320, 240, 10, -8.7, -6.13, 5.96, 10.0, 50.0, 0.0) # EPS LITE cam1 = MSScam(name, 320, 240, 10, 1, 15, 0, 10, 115, 0.0) cam1.addTosimulator(cli.sock, ipAddress, port) ## create camera 2 name = "demo1_test" + str(randint(0, 999)) ## rand in the range 0 to 999; # cam2 = MSScam(name, 320, 240, 10, -11.38, -5.8, 27.0, 20.0, 90.0, 0.0) # EPS LITE cam2 = MSScam(name, 320, 240, 10, -100.5, 30.0, -41.5, 15.0, 45.0, 0.0) cam2.addTosimulator(cli.sock, ipAddress, port) ## create camera 3 name = "demo1_test" + str(randint(0, 999)) ## rand in the range 0 to 999; # cam3 = MSScam(name, 320, 240, 10, 10.70, -6.42, 38.85, 10.0, 180.0, 0.0) # EPS LITE cam3 = MSScam(name, 320, 240, 10, 27.77, 6.1, -117.35, 0, 1.0, 0.0) cam3.addTosimulator(cli.sock, ipAddress, port) ## create camera 4 name = "demo1_test" + str(randint(0, 999)) ## rand in the range 0 to 999;