top of page
Search
Writer's pictureZhenduo Zhang

Week 4 Work Progress

Updated: Mar 5, 2020

1. Hardware part

The work in week 4 primarily focused on testing the mobility of the 4tronix robot in accordance with OCR instruction. First of all, several instruction boards such as "TURN LEFT", "TURN RIGHT", "RETURN", "STOP" were printed onto A4 paper and attached on several whiteboards. In addition, in order to validate the long sentence reading capability of the OCR, a few sentences containing both informative and disturbing words were printed out as well. For example: "TURN this a disturbing sentence LEFT", "Robot Please STOP immediately", "RETURN this is another disturbing sentence" etc. After the programming part was finished, the robot was capable of precisely identifying the keywords on whiteboards and performing the corresponding tasks. A demonstration video is shown here:


Nevertheless, there were tiny problems occurred. For example, the power of batteries and the weight of our robot.


 

2. Software part

Last week, the programming of OCR has been implemented perfectly. And the job of this week principally stressed on programming robohat controller so that it can precisely control the wheels as the OCR outcomes suggest. The code of robohat can be found in its official github project with URL: https://github.com/TickTockTech/ricket4pi

With utilizing the codes, the controlling over wheels can be realized. Additionally, we also wrote the code which enables the robot to perform corresponding tasks as the OCR outcomes suggest. Relevant code is shown below:

recognition = ""
 robohat.init()
 stop=false
 while(!stop):
   if(robohat.getDistance>18):
      robohat.forward(50)
   else:
      robohat.stop
      recognition=rasp_camera.OCR()
      print(recognition) 
      if(recognition.find("TURN")!=-1):
        if(recognition.find("LEFT")!=-1):
           robohat.spinLeft(70)
           sleep(1.6)
        elif(recognition.find("RIGHT")!=-1):
           robohat.spinRight(70)            
           sleep(1.6)
      if(recognition.find("Return")!=-1):
           robohat.reverse(50)
           sleep(2.5)
           robohat.stop()
      if(recoginition.find("STOP")!=-1)":
           robohat.stop()
           stop=true


13 views0 comments

Recent Posts

See All

Week 1 Work Progress

1.Hardware part: Three students in our group are responsible for setting up Raspberry Pi components in accordance with the official...

Comments


bottom of page