If the height of the drone is 10 meters, the horizontal and vertical angles will be changed to 20 degrees, and when the drone lands 5 meters, the angle will be changed to 10 degrees. The target is an aruco marker, no need to consider whether the deviation value is feasible. When the drone cannot find the target, it rises to a height of 1 meter to find a new target. Don’t know if this is feasible?
Hypothetical question
Hi there @Huang
When you say the horizontal and vertical angles, are you referring to the roll and pitch of the drone or something else?
However, it should be possible to make the drone rise if no aruco target is found. You could have a loop that checks if the marker is found, and if it is not, trigger the drone into GUIDED mode and send a velocity command to make it go up again to some altitude. Then you could continue searching for another aruco marker from the higher altitude
Once the marker is detected, the drone has to move towards the center of the marker and descend from there. Due to the effect of wind and to the inherent instability of the UAV itself, the drone will also move in the horizontal plane while descending. This unwanted movement should be compensated in
Electronics 2019, 8, 1532 5 of 16
order to land the drone more precisely. To achieve this behavior, the strategy described in Algorithm 1 is proposed, which works as follows: In line 3, the UAV searches for an ArUco marker. If no marker is detected, the flight mode of the UAV is changed to loiter. If this is the case for 30 consecutive seconds, the mission is aborted and the UAV will land using GPS only. Otherwise, from the potential list of detected markers, the marker with the highest ID (i.e., the smallest marker) is selected (line 11). With the use of the ArUco library, the location of the marker with respect to the drone is estimated. If the altitude of the UAV is greater than z2 (see empirical values in Table 1), α is set to 20 degrees; otherwise, it is set to 10 degrees. These values are based on: the detection distance of the markers, size of the UAV, size of the markers and a margin which is optimized empirically. In line 20 it is checked if the marker is within the virtual border (explained later). If so, the UAV descends; otherwise, it moves horizontally towards the target position. This algorithm will be executed continuously as long as the altitude of the UAV is greater than z1. From the moment the UAV’s altitude drops below z1 (very near to ground), the control will be handed over to the flight controller, which will land the UAV in a safe manner and disarm the engines.
Algorithm 1 Static vision-based
Starttimer30s
while altitude > z1 do
IDs, detected ← SearchMarker() if ¬ detected then
Loiter()
if timer exceeded then
AbortLanding()
end if else
reset timer()
ID ← highest detected ID Get P(x, y, z)id
ifz>z2 then
α = 20◦ else
α = 10◦ end if
βx =|arctan(x/z)|
βy = | arctan (y/z)| ifβx >αorβy >αthen
Move(x,y)
else
Descend()
end if end if
endwhile
DescendanddisarmUAV
Table 1. Parameter values adopted regarding Algorithms 1 and 2.
Altitude threshold z1 0.3m
Altitude threshold z2 13m
Virtual border angle (10,20angle)