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/YOUR_USERNAME/robovisionarm/blob/main/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.0.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.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file robovisionarm-0.1.0.tar.gz.

File metadata

  • Download URL: robovisionarm-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2d319334bbceea4f2fd21aaba0a458ce81941c3819bf6cdffe6ae782fbb174a6
MD5 a4a681f413bf49478db33bd89f879c1a
BLAKE2b-256 14a62fa028fe2288743e51cd133d893ae8e561db135822b6334dfe3bbff25e29

See more details on using hashes here.

File details

Details for the file robovisionarm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: robovisionarm-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbc1f86e01e6fceb3f59753e6f190fb1c0ba6d68369c6b46292ee025f0d53dde
MD5 40b58f3ab38c2d2b62d6e3248404db3e
BLAKE2b-256 3ef515cc123f2019f6b7e3f856f4a51bfc44016354b2db24e3c2a8c0a9a0c2f7

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