Skip to content

About

Autonomous 5-DOF robotic arm featuring real-time YOLOv8 perception, Cartesian inverse kinematics, and Arduino Mega hardware actuation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AI-Based Vision-Controlled Robotic Arm for Selective Object Manipulation

Autonomous 5-DOF Manipulation, YOLOv8 Perception & Real-Time Kinematic Actuation

Python PyTorch OpenCV Arduino Flask License

An end-to-end autonomous cyber-physical robotic system integrating deep learning computer vision with multi-axis inverse kinematics.
Featuring real-time YOLOv8 object detection, selective classification filtering, 2D-to-3D spatial coordinate projection, and Arduino-actuated physical pick-and-place manipulation.


Executive Summary

Traditional industrial manipulators execute rigid, pre-programmed trajectories within structured environments, lacking the visual perception necessary to adapt to dynamic scene changes, random object orientations, or selective sorting criteria.

This project architects a fully integrated vision-guided 5-DOF robotic manipulator. Visual streams captured from an overhead optical sensor are processed through a customized Ultralytics YOLOv8 neural network to identify target objects in real time. Detected bounding-box centroids are dynamically transformed from camera pixel space $(u, v)$ to Cartesian world coordinates $(X, Y, Z)$ through homographic camera-to-workspace calibration. The calculated Cartesian target is converted via analytical Inverse Kinematics into discrete servo joint angles ($\theta_1, \theta_2, \theta_3, \theta_4, \theta_5$) and transmitted over high-speed serial protocols to an Arduino Mega 2560 microcontroller for physical pick-and-place execution.


🎥 Autonomous Robotic Perception & Manipulation Live Showcase

Autonomous Vision-Controlled Robotic Arm Live Demo
Live Demonstration: Autonomous optical acquisition, real-time bounding box detection, spatial mapping, and mechanical pick-and-place execution.


📸 Engineering Schematics & Hardware Architecture

Physical Robotic Hardware & Actuation Real-Time Computer Vision & Detection
Assembled Physical Robotic Arm
Hardware Setup: 5-DOF articulated arm with DC gearmotors and mechanical end-effector.
Real-Time YOLOv8 Object Detection
Perception Pipeline: Bounding box tracking & centroid extraction via OpenCV.
Embedded Circuit Architecture & Drivers Mechanical Blueprint & CAD Modeling
Arduino Circuit Schematic
Circuit Schematic: Arduino Mega 2560, dual L298N H-bridge motor drivers, and power regulation.
Autodesk Fusion 360 3D CAD
CAD Design: Kinematic joint modeling and tolerance simulation in Autodesk Fusion 360.
Mechanical Engineering Blueprint
Robotic Arm Dimensional Blueprint
Dimensional Blueprint: Link lengths, joint rotational limits, and Cartesian reach envelope.

System Architecture & End-to-End Pipeline

┌────────────────────────────────────────────────────────────────────────────────────────┐
│                                 AUTONOMOUS ROBOTIC PIPELINE                            │
└────────────────────────────────────────────────────────────────────────────────────────┘
       │
       ▼
 ┌──────────────┐      ┌─────────────────────────┐      ┌─────────────────────────┐
 │ Overhead     │ ──►  │ YOLOv8 Neural Detector  │ ──►  │ Selective Target Filter │
 │ Video Sensor │      │ (Bounding Box Inference)│      │ (Target Class Matching) │
 └──────────────┘      └─────────────────────────┘      └─────────────────────────┘
                                                                     │
                                                                     ▼
 ┌──────────────┐      ┌─────────────────────────┐      ┌─────────────────────────┐
 │ Physical     │ ◄──  │ Serial Command Bridge   │ ◄──  │ Coordinate Homography   │
 │ Actuation    │      │ (Arduino Mega Firmware) │      │ (Pixel (u,v) -> (X,Y,Z))│
 └──────────────┘      └─────────────────────────┘      └─────────────────────────┘

Mathematical Foundations: Spatial Mapping & Kinematics

1. Camera to World Coordinate Mapping

Target centroid coordinates $(u_c, v_c)$ in 2D image plane space are mapped to the robot workspace ground plane $(X_w, Y_w)$ via affine planar homography:

$$\begin{bmatrix} X_w \ Y_w \ 1 \end{bmatrix} = \mathbf{H} \begin{bmatrix} u_c \ v_c \ 1 \end{bmatrix}$$

Where $\mathbf{H} \in \mathbb{R}^{3 \times 3}$ is the pre-calibrated perspective transformation matrix computed using ground-truth marker fiducials.

2. Analytical Inverse Kinematics (Planar Projection)

For a 5-DOF articulated arm with link lengths $L_1, L_2, L_3$:

  • Base Rotation Angle ($\theta_1$): $$\theta_1 = \text{atan2}(Y_w, X_w)$$
  • Planar Reach ($r$) & Height ($z$): $$r = \sqrt{X_w^2 + Y_w^2} - L_{\text{gripper}}, \quad z = Z_w - L_1$$
  • Elbow & Shoulder Joints ($\theta_2, \theta_3$): $$\cos(\theta_3) = \frac{r^2 + z^2 - L_2^2 - L_3^2}{2 L_2 L_3}$$

Core Technical Features

Module Implementation Impact
YOLOv8 Deep Perception Real-time object detection inference running at 30+ FPS via PyTorch and OpenCV. Immediate object identification without manual threshold tuning.
Selective Targeting Guard Target class filtering prioritizing specific objects based on user or API selection. Prevents picking unverified or hazardous objects.
Homographic Mapping Engine Coordinate matrix transforming 2D camera pixels to millimeter-accurate Cartesian targets. Sub-centimeter spatial accuracy across the working envelope.
High-Current Actuation Dual L298N dual H-bridge motor drivers paired with dedicated regulated power rails. High-torque joint retention without microcontroller brownouts.
Flask Web Telemetry Lightweight local web dashboard broadcasting real-time camera feed and servo telemetry. Remote monitoring and manual override capabilities.

Quickstart & Reproducibility Guide

# 1. Clone the repository
git clone https://github.com/vsbeginner/AI_Based_Vision_Controlled_Robotic_Arm_For_Selective_Object_Manipulation.git
cd AI_Based_Vision_Controlled_Robotic_Arm_For_Selective_Object_Manipulation

# 2. Configure Python environment
python -m venv .venv
# Windows:
.venv\Scripts\Activate.ps1
# Linux / macOS:
source .venv/bin/activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Verify Camera Sensor
python Phase_1_camera_test/CameraTest.py

# 5. Execute Real-Time Selective Manipulation Pipeline
python Phase_5_mapping/yolo_with_mapping.py

# 6. Launch Web Telemetry Interface (Optional)
python AppProject/app.py

Microcontroller Firmware Deployment:

  1. Open the Arduino IDE.
  2. Load Robotic_Arm_Arduino_Code/Robotic_Arm_Arduino_Code.ino.
  3. Select Board: Arduino Mega or Mega 2560 and the active COM port.
  4. Click Upload.

Candidate Profile & Institutional Details

  • Candidate Name: Vinayak Sharma
  • Enrollment / Roll No: 2501940012
  • GitHub Profile: @vsbeginner
  • LinkedIn Profile: Vinayak Sharma
  • Email Contact: [email protected]
  • Co-Contributor: Harsh Singh (@Harsh0012-ux)
  • Degree Program: Master of Computer Applications (MCA)
  • Institution: Department of Computer Science & Engineering, K.R. Mangalam University

Developed for academic excellence and technical portfolio showcase. Licensed under the MIT License.

About

Autonomous 5-DOF robotic arm featuring real-time YOLOv8 perception, Cartesian inverse kinematics, and Arduino Mega hardware actuation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages