← All projects
Robotics · Perception

Vision-Based Robotic Bridge Construction

Autonomous pick-and-place that builds a self-supporting bridge

The capstone of a robotics lab series: a 6-DOF arm that sees colored blocks, reasons about their orientation, and stacks them into two leaning towers that meet in the middle to form a bridge — a structure that only stands if every placement is right.

Role
Robotics — team of 2
Course
ECE 470, UIUC
Timeframe
Spring 2023
Stack
ROS · C++ / Python
ROS system architecture for the bridge build
// ROS pipeline: vision → kinematics → motion planning → placement.

01 Overview

Each "stick" is three cube blocks — a purple center flanked by yellow (left) and green (right). The system detects the markers, computes each stick's orientation, rotates and places it via inverse kinematics, and repeats until two five-level leaning towers connect at the top into a six-level bridge. The pipeline reuses ROS nodes, forward and inverse kinematics, and a marker-detection module built up across the lab series.

02 Orientation from marker geometry

Rather than trust a single marker, I compute the stick's yaw with a three-step fallback for robustness against missed detections:

  • Take arcsin of the purple→yellow vector when they sit within the expected 20–28 mm spacing;
  • fall back to the purple→green vector if yellow is missing;
  • fall back to green→yellow (44–52 mm) if the center is occluded — otherwise assume 0°.

03 Rotation without hitting joint limits

Joint 6 only spans −170° to 170°, so a naïve rotation can run into a hard limit and fault. I map the required turn to its shortest equivalent with minAngle = (target − start + 180) mod 360 − 180, then split it — picking the block at −minAngle/2 and placing it at +minAngle/2 (plus a 45° workspace offset) — so the wrist never leaves its safe range. To protect the growing tower, motions approach top-down via waypoints 5 cm above the target, and the penultimate block slides in diagonally so it doesn't knock the structure over.

04 Making it physically stand

The overhang between layers follows the classic Tower of Lire (book-stacking) series. The theoretical offsets leave almost no error margin, so I hand-tuned a compromise set — slightly more overhang at the very top to seat the connecting block, slightly less below for stability — and built the target array top-down from a 150 mm peak before reversing it to stack bottom-up.

05 Results & limits

232 mm
Bridge span achieved
6
Levels, 11 blocks
±170°
Joint-6 range managed

Against a theoretical span of ~246 mm the bridge reached 232 mm. The main error sources were camera calibration — a homography that assumes a fixed table height and ignores radial distortion — and a limited workspace that occasionally made the farthest block unreachable. I scoped the fixes too: a RANSAC slope estimate to reject marker outliers, and an "observation zone" to re-measure orientation before final placement.