Preliminary car process 2021.1.4

During the handling process, materials should be placed on the robot, and the number of materials loaded by the robot should not exceed 3 each time.
1. Put the trolley in the departure area;
2. Start the trolley according to the instructions;
3. Move the trolley to position 1., QR code area,
-----(1) 32 end: 32 send command 1pos1, 32 to mv if If the ok response command is received within 50ms, no more 1pos1 will be sent to openmv. Otherwise, 1pos1 will be sent again; wait for 50ms again to see if the ok command is received; if you get the ok message, stop the serial port reception, and miss openmv to send ok After that, open the serial port again, next time you need to receive the QR code.

-----(2) Openmv end: openmv receives the serial port information, analyzes, and sees whether it is equal to any one of (pos1/pos2) in the command library. If the analysis is successful, send ok to stm32, and send 10 times in a row ok, there is always a successful transmission; if the analysis is unsuccessful, wait forever, (stm32 will send the 1pos1 command again after 50ms, and analyze again)

Openmv scans the QR code and sends the QR code information to stm32, sending it 10 times in a row with an interval of 50ms.
stm32 receives the information and decodes it. (1) If you get the information of the QR code, stop the serial port reception, and the time to miss the QR code sent by openmv is reached. After that, open the serial port again, and use the serial port for later use. The code is displayed on the screen; (Note: The QR code information will definitely be received within 10 times*50ms by default, and it needs to be debugged. (2) If it is not the QR code information, then continue to receive it, and it will be normal once 10 times. Information.

4. The trolley moves to position 2 of the raw material area; turn on the lighting source (according to the actual situation)
----- (1) 32 end: 32 send the command to mv 2pos2, 32 if the ok response command is received within 50ms, it will not be sent 2pos2 to openmv, otherwise, send 2pos2 again, wait 50ms again to see if the ok command is received; if you get the ok message, stop the serial port reception, and the missed openmv send ok time, after that, open the serial port again and receive next time QR code is required.

-----(2) Openmv end: openmv receives the serial port information, analyzes, and sees whether it is equal to any one of (pos1/pos2) in the command library. If the analysis is successful, send ok to stm32, and send 10 times in a row ok, there is always a successful transmission; if the analysis is unsuccessful, wait forever, (stm32 will send the 1pos1 command again after 50ms, and analyze again)

Openmv takes pictures, gets the color information, and sends the color information to stm32, sending it 10 times in a row with an interval of 50ms.
The stm32 receives the information and decodes it. (1) If you get the color information, stop the serial port reception, and the time to miss the color sent by openmv is reached. After that, open the serial port and use the serial port for later use, and then display the scanned color on the screen in green On; (Note: By default, within 10 times*50ms, you can definitely receive the color information. Actually, you need to debug (2) If it is not the color information, then continue to receive it, and you can definitely get a normal information once 10 times.

5. Turn off the light source for the camera. According to the actual situation, the car will move to the transport position (move it for easy grabbing);
6. The car will move the upper material in the raw material area to the mechanical car according to the color sequence of the QR code. Up;
7. The trolley moves to the roughing area;
8. The trolley will place the upper materials in the order of the two-dimensional code, and put them in the corresponding position for roughing;
9. The trolley will move the materials in the roughing position in order
Get on the cart; 10. The cart will move to the semi-processing area;
11. The cart will place the materials in the semi-processed area in the order of the QR code;
12. The
cart will return to the raw material area when the cart is empty; 13. The cart will move the lower material in the raw material area , According to the color order of the QR code, transport the materials to the mechanical
trolley ; 14. The trolley moves to the roughing area;
15. The trolley will follow the order of the QR code, put down the lower layer materials, and put them to the corresponding position for roughing ;
16. The trolley will move the materials in the roughing position on the cart in order;
17. The trolley will move to the semi-processing area;
18. The trolley will place the materials in the semi-processing area in the order of the QR code (according to the example of your team, Realize palletizing, or realize the lowering of the upper and lower shelves);
19. When the trolley is empty, return to the return area;
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/lmf666/article/details/112181866
car