
A complete Industry 4.0 sorting cell. A camera captures parts on a conveyor, a computer-vision model classifies them as conforming or defective, and a UR5 cobot executes the pick-and-place to the correct bin. The pipeline covers image acquisition, inference, robot path planning, and gripper actuation, running end-to-end without human intervention.
The system is split into three components working in tandem: a real-time YOLO (Ultralytics) vision client on a Raspberry Pi 4 that detects good/bad pieces and overlays bounding boxes; a robot controller server (RoboDK API) that drives the UR5 arm and an OnRobot RG2 gripper through predefined positions; and an optional OLED status display. The vision client and the server communicate over a TCP/IP socket using a JSON command protocol, with a live dashboard for detection statistics and connection status.