udacity / udacidrone

An API for working with flying objects, simulated, unidentified, and otherwise.
https://udacity.github.io/udacidrone
129 stars 96 forks source link

Connection to simulator closes during the computation after few minutes. #56

Closed marufaytekin closed 5 years ago

marufaytekin commented 5 years ago

Hi,

I am testing 3d Motion Planning assignment in Flying Car ND program. The connection to drone in the simulator seems closing while a program is executing path search. If the path search takes longer more than few minutes then tries to send waypoints to drone it sends MessageID:CONENCTION_CLOSED in on_message_receive() function in drone.py. Then it throws throws following exception: if (((msg.time - self._message_time) > 0.0)): AttributeError: 'int' object has no attribute 'time'

Is there a keep alive setting for the connection that we can set? or is this a bug?

Thanks, Maruf

marufaytekin commented 5 years ago

I just found out that we can set timeout for the connection: Mavlink connection: conn = MavlinkConnection('tcp:{0}:{1}'.format(args.host, args.port), timeout=60)

RahilRehan commented 4 years ago

But, How to solve the error?