- Overview
- Features
- System Components
- Demo
- Prerequisites
- How does the system work?
- Game Loop
- Repository Structure
- Quick Start
- Running the Robot
- Development
- Documentation
- License
Traditional chess engines exist in the digital realm, but integrating artificial intelligence with physical gameplay presents unique challenges. Our project addresses the gap between virtual chess engines and real-world play by creating an autonomous robotic system capable of physically manipulating chess pieces on a standard chessboard while playing at various skill levels against human opponents.
This repository contains a complete ROS workspace for a robotic chess player using a UR10e robot arm with a Robotiq gripper.
- Autonomous chess gameplay using industrial robotic arm
- Computer vision with AprilTag detection for board state recognition
- Adaptive Stockfish chess engine with configurable difficulty
- Safe, precise movement patterns for chess piece manipulation
- Compatible with standard chess pieces and board
- Robust vision system that works in variable lighting conditions
Component | Description |
---|---|
Hardware | UR10e robotic arm, Hand-e gripper, camera, standard chessboard |
Software | Ubuntu 20.04, ROS Noetic, Python 3.8+, OpenCV, Stockfish |
- Ubuntu 20.04
- ROS Noetic (full install)
- Python 3.8 or higher
- At least 16GB RAM
- Camera with USB connection
- UR10e robot arm and Robotiq Hand-e gripper (for hardware deployment)
The vision system uses Perturb-detect-clustering mechanism to detect April Tags even in poor lighting conditions. It will apply randomized affine transformations along with color perturbations to eventually detect the tags.
Each piece is a perfect cube, with an april tag on the top for detection and a letter(e.g. P for pawn, Q for queen) etched into each of the four sides. Black pieces(top of image) are denoted by the lower half of the piece shaded black.
We use the Stockfish chess engine to analyze positions and determine optimal moves. The difficulty can be calibrated to match players of any skill level.
A UR10e robotic arm with a Hand-e gripper physically moves chess pieces on the board. The system uses inverse kinematics and sophisticated path planning to ensure precise, safe movements.
The game follows a standard loop: the robot makes a move, the vision system detects the new state, the player responds with their move on the physical board, the vision system detects the new state, and the cycle continues until checkmate.
This is a complete Catkin workspace that includes:
- Our main package (
sd02_joseph-hoane_1
) - All necessary drivers:
robotiq
- Robotiq gripper driversuniversal_robot
- Universal Robots description and configurationur_msgs
- Universal Robots message definitionsUniversal_Robots_ROS_Driver
- Main UR driver
isu_rel
- Additionaly for testing purposes
# 1. Clone the repository
git clone https://github.com/autrin/robotic-chess-player.git
cd robotic-chess-player
# 2. Build the workspace
catkin_make
# 3. Source the setup file
source devel/setup.bash
-
Launch the UR robot driver
roslaunch ur_robot_driver ur10e_griper_bringup.launch
-
Access external control on the teach pendant
-
Launch the Robotiq gripper driver (if not already initialized)
roslaunch robotiq_2f_gripper_control robotiq_action_server.launch
-
Run the main program
rosrun sd02_joseph-hoane_1 main test # OR for production mode rosrun sd02_joseph-hoane_1 main
-
Start ROS core
roscore
-
Launch the simulator
rosrun sd02_joseph-hoane_1 simulator.py
-
Run the main program in test mode
rosrun sd02_joseph-hoane_1 main.py test
For development, you can install the Python package in development mode:
pip install -e ./src/sd02_joseph-hoane_1
For more information, see the Final Report
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Team SD02 (Spring 2025) at Iowa State University requires attribution for use of this codebase. See the NOTICE file for details.