injones / mycroft_ros

A ROS wrapper for Mycroft AI
Apache License 2.0
6 stars 0 forks source link
mycroft mycroftai ros ros-wrapper

mycroft_ros

This package provides capability to run the Text-To-Speech, Speech-To-Text and Skill functionality of Mycroft AI as ROS nodes providing topics, services and actions for communication.

The package makes use of the catkin_virtualenv library to run the Mycroft nodes within a seperate Python virtual environment

Installation

  1. Install Python virtualenvironment

    sudo apt install python3-venv
  2. Install packaging using pip

    python -m pip install packaging --user
  3. Clone catkin_virtualenv into your workspace

    cd workspace/src
    git clone https://github.com/locusrobotics/catkin_virtualenv.git
    cd catkin_virtualenv
    git checkout 0.5.2
  4. If you're using Python 3 you will need to edit the catkin_virtualenv/catkin_virtualenv/scripts/global_requirements file of the catkin_virtualenv package by changing the line import Queue as Queue at the top of the file to from queue import Queue

  5. Install catkin_virtualenv using pip.

    cd workspace/src/catkin_virtualenv/catkin_virtualenv/
    python setup.py install
  6. Install catkin_virtualenv

    cd workspace
    catkin_make install --only-pkg-with-deps catkin_virtualenv
  7. Run the dev_setup.sh

    ./workspace/src/mycroft_ros/dev.setup.sh
  8. Build mycroft_ros

    catkin_make --only-pkg-with-deps mycroft_ros

Mycroft Setup

Mycroft can be configured using either ~/.mycroft/mycroft.conf or /etc/mycroft/mycroft.conf

Launching ROS Nodes

To launch all Mycroft nodes run mycroft.launch which will lanch the following nodes

if name == "main": rospy.init_node('mycroft_skill_test') example = ExampleSkill() rospy.spin() rospy.on_shutdown(example.shutdown)


## TODO
* add context to Skills
* add speak_dialog to Skills
* add events / repeating events to Skills
* error handling for skills