Coder Social home page Coder Social logo

google / stumblybot Goto Github PK

View Code? Open in Web Editor NEW
24.0 7.0 12.0 20 KB

Simple robot that executes voice commands through Google Assistant.

License: Apache License 2.0

Python 57.14% Go 42.86%
google assistant dialogflow marty martyrobot googleassistant

stumblybot's Introduction

StumblyBot

This is a very hacky test project to integrate Marty Robot, Google Assistant SDK and DialogFlow.

This is not an officially supported Google product.

What's inside

  • Marty Router
    • Accepts long-standing connections from the robot.
    • Handles queries from DialogFlow and forwards them to the connected robot.
  • Marty Server
    • Installed on a Raspberry Pi that is connected to the same WiFi network as Marty itself.
    • TODO: It would be awesome to use 4-wire connector to connect Raspberry Pi directly to the Marty controller without WiFi.
  • DialogFlow configuration
    • It will understand voice queries from Google Assistant and call Marty Router with a webhook mechanism.

Hardware requirements

How to make it work

  • Build and deploy Router
    • Install Bazel
    • Run bazel build ...
    • Upload compiled binary (from bazel-bin directory) to a machine accessible from Internet.
    • Run some webserver that will accept https and proxy it to the Marty router.
    • Obtain a valid https certificate.
    • Make sure https port is available from Internet, and port 1109 (for connections from Marty) is available from your network.
    • TODO: Make the router serve https itself without a reverse proxy.
    • TODO: Add some encryption and authentication.
  • Setup the robot
    • Install Marty python library
    • Set Marty's own IP address in executor.py and router address in marty_server.py.
    • TODO: Make everything properly configurable.
  • Setup DialogFlow
    • Edit agent.json: set hostname of the server that runs your "router" server.
    • Archive contents of dialogflow directory to a zip file, so that agent.json is in the root directory of the archive.
    • Create a new project on DialogFlow.
    • Use "Restore from zip" to upload the configuration.
    • Configure Assistant to invoke your test project.

How to debug it

  • Make sure robot server is able to connect to the Marty controller. The server writes some debugging information on stdout on startup.
  • Make sure robot server is able to connect to the router. Both robot and router write debugging information on stdout.
  • Make sure https endpoint is accessible from internet. https://<your_router>/apiai should say something.
  • Make sure your agent is available from DialogFlow debugging console (on the right hand side).
  • Make sure your agent can be activated with a command from Assistant devices.

Assistant SDK

You can install Assistant SDK on the same Raspberry Pi, connect speaker and microphone to it, and it will act as regular Google Assistant. This step is optional. You can use any Assistant-enabled device to control your robot. Google Home, Android, iOS, smart TV, whatever.

Contacts

https://groups.google.com/forum/#!forum/stumblybot - project discussion group.

stumblybot's People

Contributors

alml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.