How to move Drone in Diagonal Direction using Ground SDK?

Hello Everyone,

I am working on one project for Wind Turbine inspection using Anafi Ai Drone. For that I want to create a mission so that Drone can Inspect the Turbine and Click Photos Automatically. I have used Ground SDK for application creation and I am using RelativeMoveDirective to give Move command to Drone like given below.

var moveDirection = GuidedPilotingItf.RelativeMoveDirective(
    forwardComponent: 0.00,
    rightComponent: -1.00,
    downwardComponent: 1.00,
    headingRotation: 0.00,
    speed: null

This code will move drone to bottom left direction (1m down and 1m left).

Now, the problem with this code is that, drone is not moving in exact diagonal Direction. It is moving on curved path like shown in below image.

Here I want to take some photos of Blades of wind turbine but with this curved path drone will not be able to capture the pictures of whole blade. For that drone must move in linear Diagonal Direction like shown in picture below.

Here I am finding values of x and y using this equations:
x = sinθ * z
y = cosθ * z

So, How can I achieve this? If anyone have any idea about this then please let me know.

Thank you in Advance.

1 Like


The issue you are having here is probably related to the fact that in relative move mode, you only pick a position target, but not the speed and acceleration profiles. The dynamic of the motion is controlled by the drone’s controller, and it is not the same on vertical and horizontal axes. The vertical acceleration being different from the horizontal acceleration, the speed profiles are different and it first moves faster downward than sidewards

From what you describe, you want move the drone along a line, not just towards a given position. If you only give a position target, the anafi ai will just reach the final target, following a path that is not a priori a straight line. So I think the most efficient way to do that would be send trajectory commands, not just once but time sampled, so at every instant the drone would receive a command that is coherent with the trajectory you want it to follow.
Another simpler but less precise way to do so would be to just send velocity commands (for instance -2m/s on Y and +2m/s on Z), time sampled too ; as you won’t control the drone exact position with time it would be less precise, but after the acceleration phase you would be sure the speeds on both axes are the same. But you would only control the speed, not the position, so there is a risk it doesn’t reach the position you desire.



Hello @cdardas,

First of all, thanks for reply. I will try this using trajectory commands as you have described but I don’t know that, how to send or set Trajectory Commands using Android Ground SDK.

If you can provide link of documentation for the same, then it will be very helpful for me.

Thank you in Advance.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.