def __init__(self): """""" self.clonedRobotHandles = [] # used to store object handles of copy-pasted robots logging.info("Attempting to connect") vrep.simxFinish(-1) # just in case, close all opened connections self.__clientID = vrep.simxStart("127.0.0.1", 19997, True, True, 5000, 5) # Connect to V-REP if self.__clientID == -1: logging.error("Failed connecting to remote API server") raise () logging.info("Connected to remote API server, clientID = %d" % self.__clientID)
def __init__(self): self.clonedRobotHandles = [] # used to store object handles of copy-pasted robots logging.info('Attempting to connect') vrep.simxFinish(-1) # just in case, close all opened connections self.__clientID = vrep.simxStart('127.0.0.1', 19997, True, True, 5000, 5) # Connect to V-REP if (self.__clientID == -1): logging.error('Failed connecting to remote API server') raise() logging.info('Connected to remote API server, clientID = %d' % self.__clientID)
def __init__(self): logging.info('Attempting to connect') vrep.simxFinish(-1) # just in case, close all opened connections self.__clientID = vrep.simxStart('127.0.0.1', 19997, True, True, 5000, 5) if (self.__clientID == -1): logging.error('Failed connecting to remote API server') raise() logging.info('Connected to remote API server, clientID = %d' % self.__clientID) def loadScene(self,path): clientID=self.id res = simxLoadScene(clientID, path, 0xFF, self._def_op_mode) print(res) if res != v.simx_return_ok: raise ReturnCommandError(res) def close(self): # Закрываем соединение vrep.simxFinish(self.__clientID) logging.info("Connection closed")
def close(self): """Closes the connection with V-REP """ # Now close the connection with V-REP: vrep.simxFinish(self.__clientID) logging.info("Connection closed")
def close(self): # Закрываем соединение vrep.simxFinish(self.__clientID) logging.info("Connection closed")