Skip to main content
. 2025 Jul 28;25(15):4666. doi: 10.3390/s25154666
Algorithm 1 Guarding-Circle Collision Avoidance.
  • Require: 

    Set of robots R={1,…,N};

  •   1:

    Latest pose vector pi=(xi,yi,θi,vi) for each i∈R;

  •   2:

    Guarding circle radius rg;

  • Ensure: 

    Control command set U={u1,…,uN};

  •      Stage 0 - Offline Configuration

  •   3:

    Choose rg based on worst-case stopping distance, robot dimensions, and safety regulations.

  •      Stage 1 - Digital Twin Update

  •   4:

    Receive feature packet from the edge observer and update the state of the digital twins p^i for all i∈R.

  •      Stage 2 - Overlap Detection

  •   5:

    Initialize A←∅                                                  ▹ Set of potentially colliding pairs

  •   6:

    for all i∈R do

  •   7:

        for all j∈R with j>i do

  •   8:

            Calculate distance dij←(xi−xj)2+(yi−yj)2

  •   9:

            if dij≤2rg then

  • 10:

               Add pair to conflict list: A←A∪{(i,j)}

  • 11:

            end if

  • 12:

        end for

  • 13:

    end for

  •      Stage 3 - Conflict Resolution

  • 14:

    Initialize all commands: uk←Proceed for all k∈R.

  • 15:

    for all (i,j)∈A do

  • 16:

        if vi>vj then                                   ▹ Example priority rule: faster robot yields

  • 17:

            ui← DecelerateOrStop

  • 18:

        else

  • 19:

            uj← DecelerateOrStop

  • 20:

        end if

  • 21:

    end for

  •      Stage 4 - Actuation

  • 22:

    Transmit the final control command set U to the physical robots.