Project developed during my M.Sc. studies
Autonomous and Generalized Robotic Box Picking and Stacking
Python · OpenCV · Intel RealSense · KUKA · Summer semester 2024/2025
As a course project of the M.Sc. in Cybernetics and Robotics at CTU in Prague, our team of four built a system at the CIIRC Testbed for Industry 4.0 that sorts incoming boxes into a crate. Boxes of any shape arrive on a conveyor, an Intel RealSense D435i RGB-D camera measures each one, and a KUKA arm picks it by its center and places it in the crate. In this project, I led the team and built the computer vision part of the system.
For every box and at each frame, the vision pipeline outputs its location (the 3D center of its top face), its angle relative to the belt's motion and its shape (L, W, H). The depth image isolates the box top by keeping only the closest depths, [min, min + K·σ]. The color image gives its contour: a bilateral filter, Canny edges, cv2.findContours and cv2.approxPolyDP down to a 4-vertex polygon. The four corners are then lifted into 3D with the intrinsic matrix K and the depth of the box top.
The estimates were precise but not accurate, so a Random Forest learned an empirical correction offset, trained with positions from the robot's TCP and dimensions measured with a tape. The boxes were detected properly and placed in the computed order and location. Camera calibration was done by Ángel Hurtado, the Python-to-KUKA communication through OPC UA and a PLC by Semih Akten, and the quasi-optimal crate packing, a greedy online algorithm, by Amit Sawant.