Stitch-Zhang / Cozmo.AI

Adding AI chat and voice command functionality to Cozmo robot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


This project aims to extend Cozmo's abilities with voice recognition, interactive chatting sessions (served by online AI chatbots) special user commands, pulling useful information from the internet, etc.

Requirements

  1. First of all you need to have Python 3.x and Git installed. Python comes already preinstalled in many Linux distributions but if you are on Windows or MacOS, click here to get and install the latest version from the official Python.org website. To install Git go to the project's download webpage and get the latest version for your platform.

  2. Once Python and Git are installed you need to install Firefox browser and Selenium webdriver. You can find detailed installation notes on the links.

  3. Selenium also requires geckodriver to interface with the headless browser. Download the latest geckodriver at https://github.com/mozilla/geckodriver/releases and then install according to your OS.

  • On Windows, copy the .exe to a folder (eg C:\bin\gecko) and open a command prompt to declare it in your PATH:
$ set PATH=%PATH%;C:\bin\gecko
  • On Linux and MacOS extract the file to your home folder, open a Terminal prompt and run:
sudo cp geckodriver /usr/bin
export PATH=$PATH:/usr/bin
  1. Install all the necessary Python libraries.
  • On Windows start a command prompt, go to Python's pip.exe location (eg C:\Python35\Scripts) and run:
pip.exe install -U selenium pillow termcolor cozmo requests SpeechRecognition PyAudio
  • On MacOS and Linux start a Terminal and run:
pip3 install selenium pillow termcolor cozmo requests SpeechRecognition PyAudio

Installation

After all the requirements are met you can install Cozmo.AI as follows:

  • On Windows start a command prompt using the "cmd.exe" program and type:
set PATH=%PATH%;C:\Program Files\Git\cmd
cd %HOME%
git.exe clone https://github.com/c64-dev/Cozmo.AI.git
  • On MacOS and Linux start a Terminal and run:
cd ~/
git clone https://github.com/c64-dev/Cozmo.AI.git

Usage

  1. For the very first time only, you will need to enable the connection between your phone and your PC. There are various guides on the internet depending on your computer OS and phone type (Android/iPhone) but generally the typical process for an Android phone is this:
  • Enable USB debugging on your phone (https://gadgetsright.com/enable-usb-debugging-connect-android/)
  • Connect your phone to your computer using a USB cable.
  • Tap the USB option from the Notification Panel on your phone and then select MTP mode and let the computer finish installing the various necessary drivers.
  1. With your phone connected via USB to your computer, connect your Cozmo robot to your smartphone/tablet via wifi and run Cozmo's app.

  2. After Cozmo wakes up go to the app's settings and enable SDK mode. Now the phone whould display a black text screen and Cozmo should stop moving around. The robot is now ready to execute our Python program.

  3. Run the CozmoAI program as follows:

  • On Windows start a command prompt, go to Python's python.exe location (eg C:\Python35) and run:
python.exe %HOME%\Cozmo.AI\main.py
  • On MacOS and Linux start a Terminal and run:
python3 ~/Cozmo.AI/main.py

Updating

To update to the latest version of CozmoAI simply run the following commands:

  • On Windows start a command prompt and type:
cd %HOME%\Cozmo.AI
git.exe pull https://github.com/c64-dev/Cozmo.AI.git
  • On MacOS and Linux start a Terminal and run:
cd ~/Cozmo.AI/
git pull https://github.com/c64-dev/Cozmo.AI.git

About

Adding AI chat and voice command functionality to Cozmo robot.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%