AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

TimeoutError during takeoff

Open viniciusguigo opened this issue 8 years ago • 1 comments

Hello, everyone.

I've been getting timeout errors during takeoff when running prolonged experiments. Have anybody experienced similar issue?

Thanks!

File "./AirSimClient.py", line 488, in takeoff return self.client.call('takeoff', max_wait_seconds) File "/home/vinicius/anaconda3/envs/rllab3/lib/python3.5/site-packages/msgpackrpc/session.py", line 41, in call return self.send_request(method, args).get() File "/home/vinicius/anaconda3/envs/rllab3/lib/python3.5/site-packages/msgpackrpc/future.py", line 43, in get raise self._error msgpackrpc.error.TimeoutError: Request timed out

viniciusguigo avatar Apr 13 '18 02:04 viniciusguigo

UPDATE: This solution overcomes the problem:

    # try to handle error during takeoff
    takeoff_ok = False

    while True:
        try:
            # re-initialize airsim
            self.client.enableApiControl(True)
            self.client.armDisarm(True)

            print("taking off...")
            takeoff_ok = self.client.takeoff(max_wait_seconds=15)

            if takeoff_ok:
                break
        except:
            print("take off failed")        
            self.client.armDisarm(False)
            self.client.enableApiControl(False)

viniciusguigo avatar Apr 13 '18 12:04 viniciusguigo