Skip to main content

Computer Vision Controlled DIY Robotic Arm

Project description

๐Ÿค– RoboVisionArm

Python License Robotics Computer Vision

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

  1. Webcam captures live video
  2. MediaPipe detects hand landmarks
  3. Landmarks convert into servo angles
  4. Python sends angles via serial communication
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robovisionarm-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robovisionarm-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

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

Hashes for robovisionarm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 77eff95cd42921f3ab13677a9c909bbb6382b2aaf02d722dbd531f6fd8c0f84b
MD5 a34f731e31c263546e0178f0dcc51342
BLAKE2b-256 096f6354a4c129ba128cde767dc64a2fe52cf84fb06f47ba7489189f5435866a

See more details on using hashes here.

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

Hashes for robovisionarm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 928afa5a59b50ae54579a93081d89251eec0874098ab7d811149a1b80a3a35ff
MD5 227e67ffa74821e53ef4ac4a8daf3372
BLAKE2b-256 5923268e282a547b945785bea16201e0d845b9c3458333ea8908195d4a784a3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page