0
0
Drone Programmingprogramming~10 mins

ArUco marker landing in Drone Programming - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - ArUco marker landing
Start Drone
Search for ArUco Marker
Marker Detected?
NoKeep Searching
Yes
Calculate Marker Position
Adjust Drone Position
Is Drone Aligned?
NoAdjust Position Again
Yes
Descend Slowly
Landing Complete
Stop Drone
The drone starts, searches for the ArUco marker, detects it, calculates its position, aligns itself, descends, and lands.
Execution Sample
Drone Programming
while not landed:
    detect_marker()
    if marker_found:
        position = get_marker_position()
        align_to_marker(position)
        if aligned:
            descend()
            if on_ground:
                landed = True
This code makes the drone detect the ArUco marker, align to it, and descend until it lands.
Execution Table
StepActionMarker Found?Position CalculatedAligned?Descend?Landed?
1Start drone and searchNoN/ANoNoNo
2Search againNoN/ANoNoNo
3Marker detectedYesCalculate position (x=2,y=3)NoNoNo
4Align to markerYesPosition (2,3)YesNoNo
5DescendYesPosition (2,3)YesYesNo
6Check if on groundYesPosition (2,3)YesYesYes
7Landing completeYesPosition (2,3)YesNoYes
💡 Drone lands when it is aligned and on the ground, setting landed to True.
Variable Tracker
VariableStartAfter Step 3After Step 4After Step 5After Step 6Final
marker_foundFalseTrueTrueTrueTrueTrue
positionNone(2,3)(2,3)(2,3)(2,3)(2,3)
alignedFalseFalseTrueTrueTrueTrue
descendFalseFalseFalseTrueTrueFalse
landedFalseFalseFalseFalseTrueTrue
Key Moments - 3 Insights
Why does the drone keep searching even after starting?
Because marker_found is False at first (see step 1 and 2 in execution_table), so the drone continues searching until it detects the marker.
What happens if the drone is not aligned after detecting the marker?
The drone will keep adjusting its position and will not descend until aligned is True (see step 3 and 4).
When does the drone stop descending and consider landing complete?
When the drone is aligned and on_ground becomes True (step 6), it sets landed to True and stops descending.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step does the drone first detect the marker?
AStep 1
BStep 5
CStep 3
DStep 7
💡 Hint
Check the 'Marker Found?' column in execution_table rows.
According to variable_tracker, what is the value of 'aligned' after Step 4?
ATrue
BNone
CFalse
DNot set
💡 Hint
Look at the 'aligned' row under 'After Step 4' in variable_tracker.
If the drone never aligns, what will happen to the 'descend' variable in execution_table?
AIt will become True anyway
BIt will stay False
CIt will toggle between True and False
DIt will cause an error
💡 Hint
Refer to the 'Aligned?' and 'Descend?' columns in execution_table rows 3 and 4.
Concept Snapshot
ArUco marker landing process:
1. Start drone and search for marker.
2. Detect marker and calculate position.
3. Align drone to marker position.
4. Descend only when aligned.
5. Land when on ground and aligned.
6. Stop drone after landing.
Full Transcript
This visual execution shows how a drone uses an ArUco marker to land. The drone starts by searching for the marker. If the marker is not found, it keeps searching. Once detected, it calculates the marker's position and aligns itself. The drone only descends when aligned. When it reaches the ground, it sets landed to True and stops. Variables like marker_found, position, aligned, descend, and landed change step-by-step to guide the drone's behavior.