43 print("\nConfiguration Error: A camera configuration file needs to be specified. This file can be found in the Redist folder of your installation. "
44"See the documentation of the Python bindings for more information.")
45 exit(0)
46
47try:
48# Use Context Manager to prevent improper Tracker shutdown on errors.
49# Create an instance of the Tracker object using the default configuration path and file names.
50 with pst.Tracker("", "","", sys.argv[1]) as tracker:
51
52# Create listener with callback functions for data and/or mode updates.
53 listener = MyListener()
54
55# Register the listener object to the tracker server.
56 tracker.add_tracker_listener(listener)
57
58# Start the tracker server.
59 tracker.start()
60
61# Wait for 10 seconds, allowing for the detection of tracking targets.
62 time.sleep(10)
63except psterrors.TrackerError as err:
64# Catch TrackerError and print error messages.
65 print(err.message)
66
67if __name__ == "__main__":
68 main()
Generated on Wed Oct 18 2023 18:45:17 for PST SDK by
1.8.13