Skip to Content
Learn Robotics Programming
book

Learn Robotics Programming

by Danny Staple
November 2018
Beginner
472 pages
13h 5m
English
Packt Publishing
Content preview from Learn Robotics Programming

Building the intent

We can start with the intent, then look at some vocabulary. To build it, we will use a library built into MyCroft named adapt.

Create a folder called my-robot-skill, which we will work in to build the MyCroft skill. The main intent file will be an __init__.py file in this folder. This means that Python in Mycroft will treat the whole folder like it is a Python library, called a package. Let's start putting some code in my-robot-skill/__init__.py:

from adapt.intent import IntentBuilderfrom mycroft import MycroftSkill, intent_handlerfrom mycroft.util.log import LOGimport requests...

The imports have IntentBuilder to allow us to build and define intents around vocabulary. MyCroftSkill is a base class that we will use; our ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Robotics Programming - Second Edition

Learn Robotics Programming - Second Edition

Danny Staple

Publisher Resources

ISBN: 9781789340747Supplemental Content