public void Disconnect() { if (!_connected) { return; } SetSimulationState(SimulationCommand.Stop); Thread.Sleep(1000); VREPWrapper.simxFinish(-1); }