Computer Vision Controlled DIY Robotic Arm
Project description
๐ค RoboVisionArm
RoboVisionArm is a Python library that enables real-time control of a DIY robotic arm using computer vision and hand gestures. It uses OpenCV, MediaPipe, and Arduino serial communication to convert hand movements into robotic arm motion.
This library is ideal for:
- ๐ค DIY robotic arm projects
- ๐ Engineering and robotics students
- ๐งช Science exhibitions and competitions
- ๐ฌ Robotics and computer vision research
- ๐ญ Prototype automation systems
๐ฅ Demo Video
Upload your demo video (robotarm.mp4) to your GitHub repository and embed it here.
Example:
https://github.com/Namanlohiya/robovisionarm/robotarm.mp4
GitHub will automatically show a video player.
๐ฆ Installation
Install from PyPI:
pip install robovisionarm
Or install dependencies manually:
pip install opencv-python mediapipe pyserial
โก Quick Start
This is the fastest way to run your robotic arm:
from robovisionarm import RoboVisionArm
arm = RoboVisionArm(
port="COM3", # Change to your Arduino port (example: COM3 or /dev/ttyUSB0)
camera_index=0, # Default webcam
debug=False # True = print angles only
)
arm.run()
Press ESC to safely exit.
๐ฎ Gesture Controls
| Gesture | Robotic Arm Movement |
|---|---|
| Move hand LEFT / RIGHT | Base rotation |
| Move hand UP / DOWN | Shoulder movement |
| Move hand forward / backward | Elbow movement |
| Extend index & middle fingers | Wrist rotation |
| Pinch thumb and index finger | Open / Close gripper |
| No hand detected | Return to home position |
๐ Arduino Setup
Upload this code to your Arduino:
#include <Servo.h>
Servo base;
Servo shoulder;
Servo elbow;
Servo wrist;
Servo gripper;
void setup()
{
Serial.begin(115200);
base.attach(3);
shoulder.attach(5);
elbow.attach(6);
wrist.attach(9);
gripper.attach(10);
}
void loop()
{
if (Serial.available() >= 5)
{
base.write(Serial.read());
shoulder.write(Serial.read());
elbow.write(Serial.read());
wrist.write(Serial.read());
gripper.write(Serial.read());
}
}
๐ง How It Works
- Webcam captures live video
- MediaPipe detects hand landmarks
- Landmarks convert into servo angles
- Python sends angles via serial communication
- Arduino moves servo motors
All of this happens in real time.
๐ Example Usage
Run example script:
python examples/run_arm.py
โ๏ธ Library Parameters
RoboVisionArm(
port="COM3",
camera_index=0,
debug=False
)
| Parameter | Description |
|---|---|
| port | Arduino serial port |
| camera_index | Webcam index |
| debug | Print angles instead of sending |
๐ฆพ Hardware Requirements
- Arduino Uno / Nano / Mega
- Servo motors (SG90, MG996R, etc.)
- USB Webcam
- DIY robotic arm
- External power supply (recommended)
๐ Applications
- Gesture-controlled robotic arms
- Industrial robotic prototypes
- Educational robotics labs
- Computer vision research
- Automation demonstrations
๐ Project Structure
robovisionarm/
โ
โโโ robovisionarm/
โ โโโ controller.py
โ โโโ gestures.py
โ โโโ serial_comm.py
โ โโโ config.py
โ
โโโ examples/
โ โโโ run_arm.py
โ
โโโ README.md
โโโ LICENSE
โโโ pyproject.toml
โโโ setup.py
๐งโ๐ป Author
Naman Lohiya Robotics and Computer Vision Developer
๐ License
MIT License
โญ Support
If you like this project, consider starring the GitHub repository and sharing it with the robotics community.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robovisionarm-0.1.1.tar.gz.
File metadata
- Download URL: robovisionarm-0.1.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77eff95cd42921f3ab13677a9c909bbb6382b2aaf02d722dbd531f6fd8c0f84b
|
|
| MD5 |
a34f731e31c263546e0178f0dcc51342
|
|
| BLAKE2b-256 |
096f6354a4c129ba128cde767dc64a2fe52cf84fb06f47ba7489189f5435866a
|
File details
Details for the file robovisionarm-0.1.1-py3-none-any.whl.
File metadata
- Download URL: robovisionarm-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
928afa5a59b50ae54579a93081d89251eec0874098ab7d811149a1b80a3a35ff
|
|
| MD5 |
227e67ffa74821e53ef4ac4a8daf3372
|
|
| BLAKE2b-256 |
5923268e282a547b945785bea16201e0d845b9c3458333ea8908195d4a784a3d
|