https://github.com/tomash1234/robot-arm-filler
WORK IN PROGRESS: A robo-arm filling a cup automatically when it is empty. A cup is detected using a webcam viewing the table
https://github.com/tomash1234/robot-arm-filler
computer-vision esp8266-arduino inverse-kinematics opencv python roboarm robotics webcam
Last synced: 7 months ago
JSON representation
WORK IN PROGRESS: A robo-arm filling a cup automatically when it is empty. A cup is detected using a webcam viewing the table
- Host: GitHub
- URL: https://github.com/tomash1234/robot-arm-filler
- Owner: tomash1234
- License: mit
- Created: 2021-07-19T20:25:33.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-02T16:45:47.000Z (about 4 years ago)
- Last Synced: 2023-10-23T23:31:34.210Z (almost 2 years ago)
- Topics: computer-vision, esp8266-arduino, inverse-kinematics, opencv, python, roboarm, robotics, webcam
- Language: Python
- Homepage:
- Size: 3.49 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auto Cup Filler
Check this YouTube video: https://youtu.be/q4_bpxAipl8
Have you ever been working on your computer and suddenly your cup of coffee was empty?
And you have no other option than to stand up and walk to get a new drink?
If you reply yes to both of these questions I got a solution for you
**Auto Robotic Cup Filler**
A python script running on your laptop is scanning the table using a webcamera.
Once an empty cup is detected, the robotic arm, with a hose connected
to a pump in tank with your favourite liquid, quickly moves and fills your cup.## Viewer
I implemented a simple robot arm viewer and controller. So you can test if everything is setup corrected.
You can click on the plot and the angles needed to reach this position will be calculated## How to Install & Run
* Clone this repository
* Build or buy a Robo Arm, measure its dimensions and write them into
the config file (**config.json**)
* Find Arduino sketch (sketch_robo_arm, sketch_pump_controller and upload it to your board
* Download python and required packages (SEE: dependencies)* Connect the board and laptop to same WiFi network
(I use a hotspot on my laptop)
* Set the board IP address and port into **main.py** file and **webc.py**
* Run **main.py** to start GUI (without autofilling) OR
* Connect your webcam to see the desk and run **webcam.py** script### Dependencies
* Numpy `pip install numpy`
* OpenCV `pip install opencv-python`
* Matplotlib `pip install matplotlib`### Hardware
The Robo-arm is made of 3 servos, wooden sticks and hot glue.
The Arm and pump is controlled using an esp-8266 board (Wemos D1 R2),
which is connected via WiFi to laptop, where a python script is running.### Arm Dimensions
The Arm dimensions are stored in JSON file **config.json**,
write dimensions of your robo arm in this file.
## How does it work
### Cup detector
The Cup detector is a simple circle detector ([Hough circle transform](https://docs.opencv.org/4.5.2/da/d53/tutorial_py_houghcircles.html)) .The parameters of detector are set up to work for me, so if you have
a problem with the cup detection, try to adjust these parameters (CupDetector in detectors.py)### End of arm detector
There is a circular marker on the end of arm. The marker can be detected in same way as a cup, using Hough circle detector.
Again, if you have a problem with the detection, try to adjust the circle parameters.
![]()