VPSR faced an issue where their employees had to monitor the completion of lasered plates and manually replace them. This task took up nearly half of one employee's shift, causing inefficiency in their operations. To address this problem, they decided to purchase a Uarm Swift Pro robotic arm, which I programmed using Python.
How does it work?
As I mentioned before, the whole program was programmed in python, because UArm provides Python SDK, which provides an easy-to-use API for the uArm Swift Pro robotic arm. On top of that, basically, every program that users use needs a UI. I've chosen tkinter for that. Lastly, the program is compiled using pyinstaller and deployed as exe file.
Functional part and other gotchas
As you may have noticed from the video, this was not really that easy. I've encountered numerous small problems, which were sometimes caught after running for 2+ hours. The main functinoality can be described as a sequence, therefore if you want to understand how the program works, we shoulg go over it.
- User inputs the number of plates
- User clicks the "Start" button
- Program checks whether the device is connected
- Program runs calibration on the UArm, to make sure all coordinates are correct
- Program checks whether the input amount of plates is correct by checking the height of the "plates tower"
- The robotic arm then grabs the (N)th plate from the top and places it under a laser
- Since the plate could move slightly, the arm corrects its position
- Program turns on the laser and waits for it to finish
- After the laser is finished, program grabs the finished plate and places it on the "finished tower"
- Program then repeats everything from step 6 until the number of plates left is 0
- Program performs calibration every 10th round/plate. This was found to be the most time/correction efficient after testing
It might seem simple at first, but all of these steps are required for this process to be done correctly. Throw in some gotchas, for example, that one plate is not equal to one height (Y) coordinate, so I have to calculate the height of one plate, and you've got long-term project that took me 2 months. (Although it was my first real-world project).
The UI's not top-tier quality, but you gotta remember, I've never created UIs before this project. Also, I've used python to create the UI, which I've also never done before. You can see the main screen above. The UI's pretty straightforward to use. All you need to do is input number of plates to do, and click on start. You may wonder why there's a lot of space under the buttons, that's because program logs info there.
Another thing you may notice is the "help" section in the navbar. This help section provides windows with help texts and tutorials on how to act in certain situations that could occur.
This program was made in early 2020 and runs to this day (or at least till the day of writing this).
Believe it or not, but this was my first real programming project - January 2020. This project has been the initial spark for my programming passion! I have spent 2 months perfecting this project (back then, I've never spent that much time on anything except games) and although it's a relatively simple python program, I'm really proud of it to this day.
I hope you enjoyed this article/blog post!
If you have any questions, problems or want to start a discussion, don't hesitate and write me an email!