Skip to main content
. 2021 Jun 24;21(13):4332. doi: 10.3390/s21134332
Algorithm 1 Pseudo-code of the exploration strategy with modified frontier exploration algorithm
  • 1:

    FcheckFrontier()

  • 2:

    for Every points in F do

  • 3:

        if F is a connected frontier then

  • 4:

            FconnectedFi

  • 5:

        end if

  • 6:

    end for

  • 7:

    for Every points in Fconnected do

  • 8:

        Copen compute centeroid of Fconnected

  • 9:

        Arrange Copen in ascending order of distance from robot pose

  • 10:

    end for

  • 11:

    forCopen is not empty do

  • 12:

        destination_poseFiopen

  • 13:

        Check for Probable Dirt Points.

  • 14:

        if Probable Dirt Points then

  • 15:

            Transform interest point to global frame assign to IPopen

  • 16:

            Arrange DPopen in ascending order of distance from robot pose

  • 17:

            for Every points in DPopen do

  • 18:

               Transform interest point to global frame

  • 19:

               Generate sample points S

  • 20:

               Select sample points diagonally and insert to SP

  • 21:

               if Selected sample point not in obstacle then

  • 22:

                   Insert sample point to SP

  • 23:

               end if

  • 24:

               for Every points in SP do

  • 25:

                   Navigate the robot to SPi

  • 26:

               end for

  • 27:

               DPiclosedDPiopen

  • 28:

            end for

  • 29:

        end if

  • 30:

        Navigate the robot to Ciopen

  • 31:

        CiclosedCiopen

  • 32:

        Initiate a 360deg sweep

  • 33:

        FcheckFrontier()

  • 34:

    end for