Research Article

Navigation for Indoor Robot: Straight Line Movement via Navigator

Algorithm 1

The implementation of PID algorithm.
1 Do
2 ifn=1 or 2
3  calculate the offsets of right and left wheel ,
4  calculate the current PWM value of right and left wheel ,
5  substitute n=1 or 2 into equation(6), obtain , , ,
6 if n=3
7  substitute , , , into equation(6)
8 While (if work signal = true)
9 return,, ,,