Research Article

Navigation for Indoor Robot: Straight Line Movement via Navigator

Algorithm 2

DFS stack for cleaning work.
1 Define every room has a unique ID
2 Let S be a stack
3 if robot receive an infrared ray communication signals
4  Start work in regular path
5  if the robot receive another infrared ray communication signals
6   Then S.push()
7   When finish working this room
8    While S is not empty
9      = S.pop()
10      Enter the ID of room
11       if is not labeled as discovered:
12       Label as discovered
13      Goto line 3
14      Back to initial room, then the work is over
15 Else
16  Stop work