Git Product home page Git Product logo

chess_robot's Introduction

Voice Controlled Chess Robot

System Overview

This is a project to develop a voice controlled chess robot. A Universal Robotics’ UR5e collaborative robot is used with a Robotiq Hand-E Gripper to manipulate chess pieces. A computer with Python 3.8, is used to accept voice commands, relay cartesian coordinates to the UR5e, and track the state of the board. Python Chess is used for tracking the state of the board and Speech Recognition is used for translating voice commands.

Setup Instructions

  • Download or clone

  • pip install requirements.txt

  • Set the location of the discard tray for chess pieces in chess_movement_program.script

  • Copy the contents of ur_programs to the Teach Pendant

  • Set the correct IP address for your computer in the main_ur_loop program on the Teach Pendant and in the main_wakeword_version.py or main.py files.

  • Using the Teach Pendant, find the x-y coordinates of the a1 and h7 squares with respect to the base of the UR5e. Board Configuration

  • Set the a1 and h7 coordinates in main_wakeword_version.py or main.py as cb = chess_board.chess_board(x0, y0, x7, y7)

Usage

  • Start by running the main_ur_loop on the Teach Pendant

  • Run either main.py or main_wakeword_version.py to begin listening for voice input. The wakeword version listens for "robot" or "ok robot" using PocketSphinx. Movement commands are translated using the Google Speech Recognition API.

  • During early development of this platform, the goal was to utilize standard algebraic chess notation for voice commands. It became clear that, in order for this to function correctly, it would require a bit of work developing a program capable of discerning words and letters that are easily misinterpreted by a speech recognition API e.g.: the letter “c” sounds quite similar to the letter “e.” Since this project’s goal is the realization of a feasibility prototype, it was decided to adapt a command grammar that could be more easily interpreted by a speech recognition API.

    Movement commands are given by stating two row-column pairs. An example of a move is shown below:

    Sample Move

    The full terminal output:

    Terminal Output

How it Works:

ProcessFlow

Goals for Improvement:

  • Integrate a chess engine using Python Chess's support for UCI engine communication.
  • Improve speech recognition so that moves can be specified in standard algebraic notation.
  • Improve accuracy of gripper Z-position by keeping track of the height of each piece on the board. As of now, all pieces are assumed to be the same height.
  • Integrate machine vision for more accurate targeting of chess pieces.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.