Offline programming of a KUKA LBR iiwa 14 R820 (a 7-axis collaborative arm) that drills a pattern of holes in a panel carried by a KUKA KMP 1500 mobile platform. Written in Python against the RoboDK API and run in RoboDK's simulator.
Course project at Concordia University, 2019.
The panel is larger than the arm's workspace. The arm can only drill where the horizontal distance from its base falls between 350 mm and 750 mm, and most holes start outside that band. So the program also drives the platform:
- Read the hole pattern from a text file and split it into a near half and a far half.
- For each near-side hole, slide the platform sideways just far enough to bring the hole into reach, then hover, plunge, retract, plunge again to check the hole, and retract.
- Re-centre the platform, back it away from the arm, turn the panel 180°, and bring it back.
- Mirror the far-side coordinates for the turned panel and drill them the same way.
- Report how many holes failed inspection. More than 25 % flagged counts as a failed job.
The cell had no hole-quality sensor, so inspection is simulated: each hole is flagged with a configurable probability (25 % by default), and the operator is prompted on each failure.
- Install RoboDK and open
station/drilling-cell.rdk. - Install the Python dependencies and start the job:
pip install -r requirements.txt
python -m drilling data/holes_grid.txt --seed 1 --no-pause| Option | Default | Meaning |
|---|---|---|
holes |
data/holes_grid.txt |
Hole offsets from the panel origin, one x,y per line (mm) |
--failure-rate |
0.25 |
Probability that the simulated inspection flags a hole |
--seed |
random | Seed for a repeatable run |
--no-pause |
off | Don't wait for Enter after a flagged hole |
No RoboDK? Open simulation/drilling-simulation.html in a browser to replay the recorded run in 3D. The geometry and job sequencing are covered by tests that run against a fake station:
python -m pytest| Path | Contents |
|---|---|
drilling/geometry.py |
Reach check, panel-shift search, side split and mirroring (NumPy only) |
drilling/cell.py |
RoboDK control: platform motion, panel turn, drilling moves, inspection |
drilling/__main__.py |
Command-line entry point |
data/ |
Hole patterns: the full grid, and the perimeter set used in earlier trials |
station/ |
RoboDK station and the screwdriver tool model (STL) |
simulation/ |
Self-contained 3D replay exported from RoboDK |
tests/ |
Unit tests and a full-job run against a fake RoboDK station |
Python, NumPy, RoboDK API · KUKA LBR iiwa 14 R820, KUKA KMP 1500
Saud Altamimi, Ibrahim Babiker, Haoqi Meng.

