Robot

The Robot part of a HEXA skill contains the code that is running on the robot.

We use the Go programming language to write code for HEXA, and we have a detailed SDK reference to describe the different functions we provide.

All your code will go into the src folder, and assets is where you place your configuration files or data files needed for your application.

You can pull in other libraries and packages to extend the functionality of your Skill. For instance, say you wanted to use OpenCV, a computer vision toolkit, to analyze imagery picked up by HEXA's camera.

Third-party libraries and dependencies are stored in the deps folder. The include search path will be set to deps/include and LD_LIBRARY_PATH will be set to deps/lib. The lib folder is where your libraries will go, however, you need to compile them for the ARM architecture that sits on the HEXA robot.

Building a Skill

To use the MIND SDK, you'll need to have it installed on your machine and import it into your golang file.

import"mind/core/framework"

To develop a Skill, implement the skill.Base interface:

type Interface interface {
OnStart() // Called when Skill is started
OnClose() // Called when Skill is closed
OnConnect() // Called when Skill is connected
OnDisconnect() // Called when Skill is disconnected
OnRecvJSON([]byte) // Called when remote sent data
OnRecvString(string) // Called when remote sent a string
}

Here's an example of the simplest Skill possible, to give you an idea of what the skeleton looks like: