1. Hardware
Last week, we successfully enabled the mobility of the 4tronix Initio robot and it can perform the corresponding tasks as OCR outcomes suggest. The task of this week predominantly emphasized on designing a designated route for the robot. After the discussion, the route was decided as below so that every function of the robot can be demonstrated. Forward--Turn Left--Turn Right--Null-- Return and Speed Up -- Spin-- Stop Moreover, in order to explicitly illustrate the outcome of OCR, the screen was mounted on the robot. After an OCR operation, its outcome will be displayed on the screen. The final structure of our robot can be viewed below:
Figure 1: Mobile OCR Robot
2. Software
During the testing process, a bug was displayed to us, which results from the situation that the camera does not capture the sentence, thereby leading to a null OCR outcome which the program we wrote cannot process
To avoid this bug, we extended our previous codes by adding the null OCR outcome situation. The specific code is shown below:
if(recognition =''): #avoid collison
robohat.spinRight(70)
sleep(1.6)
robohat.forward(50)
sleep(2)
robohat.spinLeft(70)
The integrate codes, which consist of pytesseract library, picamera library, robohat part as well as controlling part, enables the robot to precisely identify instructions and perform corresponding actions. Therefore, our target of implementing a mobile OCR robot is basically achieved.
Comments