Skip to main content
. 2020 Jun 10;20(11):3298. doi: 10.3390/s20113298
Algorithm 1 Wall Following and Obstacle Avoidance
  •  1:

    Input:

  •  2:

    Image capture from HSR vision system

  •  3:

    Output:

  •  4:

    Alert signal (Alert_HSR) to HSR for obstacle avoidance and safe cleaning

  •  5:

    Initialize:

  •  6:

    C is an Camera

  •  7:

    F is an Image frame

  •  8:

    Segment_array: hold the segmented image

  •  9:

    Wall_Segment: hold the segmented wall image

  • 10:

    Floor_Segment: hold the segmented floor image

  • 11:

    Object_wall: hold the detected objects on wall

  • 12:

    Object_floor: hold the detected objects on floor

  • 13:

    Initialize End

  • 14:

    Begin:

  • 15:

    while (1) do

  • 16:

    F = Capture Frame (C)

  • 17:

    Segment_array = FCN8_ segmentation(F)

  • 18:

    Wall_Segment = Segment_array && floor_mask    ; mask the floor

  • 19:

    Floor_Segment = Segment_array && wall_mask    ; mask the wall

  • 20:

    Object_wall = SSD_MobileNet (wall_segment)    ; Object detection on segmented wall region

  • 21:

    Object_floor = SSD_MobileNet (floor_segment)    ; Object detection on segmented floor region

  • 22:

    Distance_floor-obstacle_wall ( wall_segment, floor_segment)    ; compute the distance of the detected floor object from wall

  • 23:

    Wall_Object-distance_ground( wall_segment, floor_segment)    ; compute the distance of the detected wall object from ground

  • 24:

    if (Distance_floorobstacle_wall) then

  • 25:

      Alert_HSR( obstacle near by wall)    ; Alert to HSR to avoid obstacle on path

  • 26:

    end if

  • 27:

    if (Wall_Objectdistance_ground ) then

  • 28:

      Alert_HSR( object on wall)    ; Alert to HSR for cleaning modules safe operation

  • 29:

      goto Begin

  • 30:

    else

  • 31:

      goto Begin

  • 32:

    end if

  • 33:

    end while