Skip to main content
. 2020 Jun 23;20(12):3543. doi: 10.3390/s20123543
Algorithm 1: Algorithm for door handle detection and cleaning
  1: Input:
  2: Image capture from RGBD module
  3: Output:
  4: enable signal to cleaning module
  5: Initialize:
  6: F is an Image frame
  7: detection_result: is an variable hold the object detection results
  8: D: is an variable
  9: Initialize End
  10: Begin:
  11: while (1) do
  12: search:
  13: F = capture Image (C)
  14: detection_result= CNN_Object_ detection(F)
  15: if (detection_result == doorhandle|door) then
  16:  D=distance_function(door_robot base) ; compute the distance between door and robot base
  17:  Move_base(MoveIt(D)) ; move towards door using distance data
  18:  goto alignment_check
  19: else
  20:  goto: search
  21: end if
  22: alignment_check:
  23: if (detection_result == doorhandle) then
  24:  arm_manipulation (MoveIt) ; enable the arm manipulation to initiate the door handle cleaning
  25:  goto: cleaning _enable
  26: else
  27:  base_align( base_movement ) ; adjust the robot base for searching the door handle if door is detect on first frame
  28:  F = capture Image (C)
  29:  D = CNN_Object_ detection(F)
  30:  goto: alignment_check
  31: end if
  32: cleaning_enable:
  33: if (ARM_synchronize && door_handle_detected) then
  34:  enable_cleaning module (1) ; enable the cleaning module if ARM position is synchronize with door handle
  35:  wait (cleaning_ done)
  36: else
  37:  ARM_synchronize( enable_arm manipulation(MoveIt)) ; enable the arm manipulation function for synchronize arm position with door handle
  38:  F = capture Image (C)
  39:  goto: cleaningenable
  40: end if
  41: end while