Beispiel #1
0
    def __init__(self):
        # make sure the interface is initailized for the correct use case
        self.interInit = False
        self.idmInit = False
        self.visionInit = False
        self.gamepadInit = False
        self.slideInit = False

        # need a ref to AurisInterface for the garbage collector
        self.interface = AurisInterface
        if (AurisInterface.GetVersion() != LOW_LEVEL_VERSION):
            print("Python Lib does not match compiled Lib",
                    AurisInterface.GetVersion(),
                    "!= auris low level version",
                    LOW_LEVEL_VERSION)
            raise Exception("Version Mismatch.")
Beispiel #2
0
 def Initialize(self, domainId, testIPAddr = None):
     print("Initializing Network ...")
     if (testIPAddr != None):
         print("Pinging ip (", testIPAddr, ") (must be UID 0) ...")
         resp = os.system("ping -c 1 " + testIPAddr)
         if (resp != 0):
             print("Failed to ping IDM.")
     if (AurisInterface.GetVersion() != LOW_LEVEL_VERSION):
         print("Python Lib does not match compiled Lib",
                 AurisInterface.GetVersion(),
                 "!= auris low level version ",
                 LOW_LEVEL_VERSION)
         return -1
     if (AurisInterface.InitializeNetwork(domainId) != 0):
         print("Failed to connect to RTI")
         return -1
     else:
         print("Network Configured.")
         self.visionInit = True
         self.interInit = True
         sys.stdout.flush()
         return 0