Open douglaswsilva opened 4 years ago
Which made it be false and the other calibration values to be true.
Oh, so do you always get a timeout on the sensor when it fails? And for the different sensors?
@julianoes: do you have insights on what it means to have a timeout on one of those parameters? MAVSDK will try to get the parameter multiple times before it gives up, right? Could that mean that on the firmware side, something is wrong with this param?
My thought is that this might be a link congestion issue on startup.
We could try it with a longer timeout and more retransmissions.
@JonasVautherin The "wrong" calibration values don't happen every time. I was only able to reproduce this once when connected to the debugger. But I imagine that every time it happens, it's probably caused by this timeout in one of the calibration values.
@julianoes That'd be cool to try. Let me know how I can help.
@julianoes is there an easy and ugly way to add a super long timeout, just to confirm that this is the root cause? From discussions with @douglaswsilva, it seems like they can reproduce it reasonably often (like 1/5th of the time) in their setup.
@julianoes If there's a place I can increase the timeout in the mavsdk, let me know. I can do it locally, build, and test it to see if it fixes the issue.
https://github.com/mavlink/MAVSDK/blob/d9ecfcb681fd2340768e263d7b265e6d3a607aea/src/core/mavlink_parameters.cpp#L197 https://github.com/mavlink/MAVSDK/blob/d9ecfcb681fd2340768e263d7b265e6d3a607aea/src/core/mavlink_parameters.cpp#L248
Oops, retry is not implemented yet: https://github.com/mavlink/MAVSDK/blob/d9ecfcb681fd2340768e263d7b265e6d3a607aea/src/core/mavlink_parameters.cpp#L461
@julianoes Thanks, I'll take a look into this.
@julianoes @JonasVautherin Our test engineering is currently testing the fix for this: https://github.com/mavlink/MAVSDK/pull/972/files. Thanks Julian!
On that note, I noticed another issue that I'm double testing and believe it shouldn't be hard to fix, but I'd need your guys help.
I think if you subscribe to drone.telemetry.health
before the drone is connected and then connect the drone, it will not update the values.
As I said, I'm going to double check this, but let me know if you spot anything weird.
Right, we should probably reset the health data here: https://github.com/mavlink/MAVSDK/blob/c5404eb7ca88b6a404b82154d7ad49b3cc6b7d17/src/plugins/telemetry/telemetry_impl.cpp#L186
@julianoes I had a quick look at it, and I don't understand your comment. Shouldn't health
be advertised on each heartbeat, as per process_heartbeat
here?
Some of the health information is based on parameters that are queried. That is only a "workaround for now" but that's why the data can be stale.
And disable()
will be called when the drone is discovered? :thinking:
Hey guys,
As I spoke with Jonas, sometimes we've been getting "wrong" calibration to some of the values when subscribing to
telemetry.health
. I finally was able to reproduce it connected to the debugger and this is what I see int he logs coming from the SDK:As you can see, there was a timeout in
Which made it be false and the other calibration values to be true. To reproduce this I just ran our app on iPad and while connected to drone via wifi.
If we are subscribing to too many things at the same time, therefore causing the timeout, please let us know. And if you have any suggestion for the best way to subscribe to things, we'd appreciate.
Once again, thanks for looking into this!