Distance to obstacle in GroundSDK

,

I am wondering how to get the distance from the drone to the environment. Ideally I’d like to know how far something is in front of the drone.

Here are a few options that I explored:

The HelloDrone AirSDK mission does some calculations on the distance sensors but all the examples of interacting with AirSDK seem to focus on how to do so from Olympe and not the GroundSDK. Also I don’t want to create a custom guidance mode, I only need to get the distance value and display it on my GroundSDK app.

I see in the docs that there is an Instrument representing the stereo camera but it only has a boolean showing if it’s calibrated or not.

I’m also curious if there’s a way to hook into the Obstacle Avoidance system and have it tell me the distance to the obstacle that it is trying to avoid.

Thanks for any insight and pointers you may have

In the Sphinx dashboard I am able to plot a sensors_tof_0.distance. Is this something that is only in Sphinx or is it available on hardware?

If it’s on hardware is it the obstacle avoidance distance? Can I get this value from the GroundSDK somehow?

Hello,

There is no GroundSDK API regarding distance to obstacles.

What can be done is use the depthmap video feed in an AirSDK mission. See here. Creating a guidance mode is not necessary, this can be done in a mission service with a Video IPC client.

The TOF is a simple ground distance sensor on the bottom of the drone, it is not used for obstacle avoidance.

I understand that. I am able to build the AirSDK example mission and get the depth value using Olympe. However when I tried to do this from the GroundSDK I could not get it to work. Do I need to send a command to the drone to get it to tell me the distance? I tried using latestMessage from the MissionManager but it only ever returned null.

I would appreciate either an example of this interaction or more thorough explanation of each of the communication process in the documentation.