Downward braking distance not changed correctly
CompletedHello,
When changing the braking distance for direction `DOWNWARDS`, the actual braking distance is not changed correctly. The method used to change braking distance is
perceptionManager.setObstacleAvoidanceBrakingDistance(distance, PerceptionDirection.DOWNWARD, callback)
The decimal part of the distance is truncated, for example, when setting braking distance to 1.9, it will be actually set to 1 when reading perception info using `perceptionManager.addPerceptionInformationListener`. The same is for e.g. 0.7, the braking distance received from the listener will be set to 0. There is no error returned, `onSuccess` callback is called. If distance is set to 1 or 2, then it works ok, values are not changed.
Zero is not even in the valid range according to the docs:
https://developer.dji.com/api-reference-v5/android-api/Components/IPerceptionManager/IPerceptionManager.html#iperceptionmanager_setobstacleavoidancebrakingdistance_inline
Are valid ranges in the link above the same for all drones?
Changing braking distance for `PerceptionDirection.HORIZONTAL` or `UPWARD` works OK. Is this a SDK issue or am I missing something?
Thank you for your help
-
DJI Developer Support I just checked and can confirm that behavior is better, but I noticed some small 'misupdates', only for some values:
when set to 0.9, it's actually set to 0.8, and some other values change as well (e.g. 1.4 -> 1.3).
But some values are set ok and not changed, e.g. 1.7.
-
One more question, is there a way to get valid ranges for braking/warning distances for each drone?
DJI Pilot 2 shows different braking/warning ranges for different drones, and I'd like to avoid setting invalid values.
For example, according to the docs, the range for horizontal warning distance is between 1.1 and 33.0, but DJI Pilot 2 shows a horizontal warning range between 1.1, and 16.0. Can I expect that distance of 33 will work with every drone?
Thanks!
-
I just checked and can confirm that behavior is better, but I noticed some small 'misupdates', only for some values: when set to 0.9, it's actually set to 0.8, and some other values change as well (e.g. 1.4 -> 1.3). But some values are set ok and not changed, e.g. 1.7. -->Is this also about the M300? One more question, is there a way to get valid ranges for braking/warning distances for each drone? DJI Pilot 2 shows different braking/warning ranges for different drones, and I'd like to avoid setting invalid values. --> there is no interface available in the SDK to retrieve the information you are looking for. However, you can refer to the scope provided in Pilot 2 for guidance.
Please sign in to leave a comment.
Comments
4 comments