AirSim
AirSim copied to clipboard
TimeoutError during takeoff
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
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)