sdk_wrapper

package
v0.0.0-...-62168f3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 32 Imported by: 8

Documentation

Index

Constants

View Source
const ANIMATED_GIF_SPEED_FAST = 0.5
View Source
const ANIMATED_GIF_SPEED_FASTEST = 0
View Source
const ANIMATED_GIF_SPEED_NORMAL = 1.0
View Source
const ANIMATED_GIF_SPEED_SLOW = 2.0
View Source
const ANIMATED_GIF_SPEED_SLOWER = 3.0
View Source
const IMAGE_TRANSITION_FADE_IN = 1
View Source
const IMAGE_TRANSITION_FADE_OUT = 6
View Source
const IMAGE_TRANSITION_NONE = 0
View Source
const IMAGE_TRANSITION_SLIDE_DOWN = 5
View Source
const IMAGE_TRANSITION_SLIDE_LEFT = 2
View Source
const IMAGE_TRANSITION_SLIDE_RIGHT = 3
View Source
const IMAGE_TRANSITION_SLIDE_UP = 4
View Source
const LANGUAGE_CHINESE = voices.Chinese
View Source
const LANGUAGE_DUTCH = voices.Dutch
View Source
const LANGUAGE_ENGLISH = voices.English
View Source
const LANGUAGE_FRENCH = voices.French
View Source
const LANGUAGE_GERMAN = voices.German
View Source
const LANGUAGE_ITALIAN = voices.Italian
View Source
const LANGUAGE_JAPANESE = voices.Japanese
View Source
const LANGUAGE_PORTUGUESE = voices.Portuguese
View Source
const LANGUAGE_RUSSIAN = voices.Russian
View Source
const LANGUAGE_SPANISH = voices.Spanish
View Source
const TTS_ENGINE_ESPEAK = 1
View Source
const TTS_ENGINE_HTGO = 0
View Source
const TTS_ENGINE_MAX = TTS_ENGINE_NATIVE
View Source
const TTS_ENGINE_NATIVE = 3
View Source
const TTS_ENGINE_VOICESERVER = 2
View Source
const TTS_ENGINE_VOICESERVER_VOICE_ENGLISH_BATTLEDROID = "TM:x8kck28kthq7"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_ENGLISH_DEFAULT = "TM:x8kck28kthq7"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_ENGLISH_VOLDEMORT = "TM:nczpqg58jj6n"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_ENGLISH_WEDNESDAY = "TM:pqv7261xqhjk"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_FRENCH_BUGS_BUNNY = "TM:xn0ps57a5akf"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_GERMAN_WOLFF_FUSS = "TM:pdp9dhyra0ph"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_ITALIAN_WANNA_MARCHI = "TM:rdejatdh1r6h"
View Source
const TTS_ENGINE_VOICESERVER_VOICE_SPANISH_BURRO_DE_SHREK = "TM:09awctyevpey"
View Source
const VECTOR_SCREEN_HEIGHT = 96
View Source
const VECTOR_SCREEN_WIDTH = 184
View Source
const VOLUME_LEVEL_MAXIMUM = 5
View Source
const VOLUME_LEVEL_MINIMUM = 1
View Source
const WEATHER_UNIT_CELSIUS = "c"
View Source
const WEATHER_UNIT_FARANHEIT = "f"

Variables

View Source
var SDKConfig = SDKConfigData{"/tmp/", "data", "nvm"}
View Source
var SYSTEMSOUND_WIN = "audio/win.pcm"

Functions

func AssumeBehaviorControl

func AssumeBehaviorControl(priority string)

func ConvertPixelsToRawBitmap

func ConvertPixelsToRawBitmap(image image.Image, opacityPercentage int) []uint16

func ConvertPixesTo16BitRGB

func ConvertPixesTo16BitRGB(r uint32, g uint32, b uint32, a uint32, opacityPercentage uint16) uint16

func DataOnImg

func DataOnImg(fileName string) []byte

func DataOnImgWithTransition

func DataOnImgWithTransition(fileName string, transition int, pct int) []byte

func DisableAudioStream

func DisableAudioStream()

func DisableCameraStream

func DisableCameraStream()

func DisplayAnimatedGif

func DisplayAnimatedGif(imageFile string, speed float64, loops int, repaintBackgroundAtEveryFrame bool) error

func DisplayCondition

func DisplayCondition(condition string, iconCode string, duration int, blocking bool)

func DisplayImage

func DisplayImage(imageFile string, duration int, blocking bool)

func DisplayImageWithTransition

func DisplayImageWithTransition(imageFile string, duration int, transition int, numSteps int) error

func DisplayTemperature

func DisplayTemperature(temp int, unit string, delay int, blocking bool) error

func DownloadFile

func DownloadFile(filepath string, url string) (error, string)

func DriveOffCharger

func DriveOffCharger()

func DriveOnCharger

func DriveOnCharger()

func DriveWheelsForward

func DriveWheelsForward(lw float32, rw float32, lwtwo float32, rwtwo float32)

func EnableAudioStream

func EnableAudioStream()

func EnableCameraStream

func EnableCameraStream()

func FaceEnrollmentCancel

func FaceEnrollmentCancel() string

Cancels operation

func FaceEnrollmentChangeName

func FaceEnrollmentChangeName(faceId int32, oldName string, newName string) string

func FaceEnrollmentDeleteAll

func FaceEnrollmentDeleteAll() string

func FaceEnrollmentDeleteById

func FaceEnrollmentDeleteById(id int32) string

func FaceEnrollmentListAll

func FaceEnrollmentListAll() []*vectorpb.LoadedKnownFace

func FaceEnrollmentStart

func FaceEnrollmentStart(personName string) string

func GetAudioVolume

func GetAudioVolume() int

Returns values in the range 0-100

func GetCameraPicture

func GetCameraPicture() image.Image

Enables camera, saves current image on a file in jpg format, disables camera

func GetChatTarget

func GetChatTarget() string

func GetCurrentGameData

func GetCurrentGameData() string

func GetDataPath

func GetDataPath(filename string) string

func GetEyeColor

func GetEyeColor() color.RGBA

func GetLanguage

func GetLanguage() string

func GetLanguageAndCountry

func GetLanguageAndCountry() string

func GetLanguageISO2

func GetLanguageISO2() string

func GetLocale

func GetLocale() string

func GetMasterVolume

func GetMasterVolume() int

Returns values in the range 1-5

func GetMyStoragePath

func GetMyStoragePath(filename string) string

func GetRobotName

func GetRobotName() string

func GetRobotSerial

func GetRobotSerial() string

func GetStaticCameraPicture

func GetStaticCameraPicture(hiRes bool) (image.Image, error)

Gets a single image from camera

func GetTTSConfiguration

func GetTTSConfiguration() (int, string)

func GetTempPath

func GetTempPath() string

func GetTemperatureUnit

func GetTemperatureUnit() string

func GetTemporaryFilename

func GetTemporaryFilename(tag string, extension string, fullpath bool) string

func GetVectorSettings

func GetVectorSettings() map[string]interface{}

func InitLanguages

func InitLanguages(language string)

func InitSDK

func InitSDK(serial string) error

func InitSDKForWirepod

func InitSDKForWirepod(serial string) error

func IsOSKR

func IsOSKR() bool

func LoadAnimationList

func LoadAnimationList() []string

func MoveHead

func MoveHead(speed float32)

func MoveLift

func MoveLift(speed float32)

func PlayAnimation

func PlayAnimation(anim string, loops uint32, ignoreBodyTrack bool, ignoreHeadTrack bool, ignoreLiftTrack bool)

func PlaySound

func PlaySound(filename string) string

func PlaySystemSound

func PlaySystemSound(systemsound string)

func ProcessAudioStream

func ProcessAudioStream()

func ProcessCameraStream

func ProcessCameraStream() image.Image

func RefreshSDKSettings

func RefreshSDKSettings() error

func ReleaseBehaviorControl

func ReleaseBehaviorControl()

func SaveCameraPicture

func SaveCameraPicture(fileName string) error

Enables camera, saves current image on a file in jpg format, disables camera

func SaveCustomSettings

func SaveCustomSettings()

func SaveHiResCameraPicture

func SaveHiResCameraPicture(fileName string) error

func SayText

func SayText(text string)

func SetAnimProcessVariable

func SetAnimProcessVariable(key string, value string) error

func SetBackgroundColor

func SetBackgroundColor(col color.RGBA)

func SetChatTarget

func SetChatTarget(name string)

func SetCurrentGameData

func SetCurrentGameData(gameData string)

func SetCustomEyeColor

func SetCustomEyeColor(hue string, sat string)

func SetLanguage

func SetLanguage(lang string)

func SetLocale

func SetLocale(locale string)

func SetLocation

func SetLocation(location string)

func SetMasterVolume

func SetMasterVolume(volume int) error

func SetPresetEyeColor

func SetPresetEyeColor(value string)

func SetRobotName

func SetRobotName(name string)

func SetSDKPaths

func SetSDKPaths(tmpPath string, dataPath string, nvmPath string)

func SetSettingSDKstring

func SetSettingSDKstring(setting string, value string)

func SetTTSConfiguration

func SetTTSConfiguration(ttsEngine int, ttsVoice string)

func SetTTSEngine

func SetTTSEngine(TTSEngine int)

func SetTTSVoice

func SetTTSVoice(voice string)

func SetTimeZone

func SetTimeZone(timezone string)

func TextOnImg

func TextOnImg(text string, size float64, isBold bool, color color.RGBA) []byte

func Translate

func Translate(text string, inputLanguage string, outputLanguage string) string

func TriggerWakeWord

func TriggerWakeWord() error

func UseVectorEyeColorInImages

func UseVectorEyeColorInImages(enabled bool)

func WaitForEvent

func WaitForEvent() *vectorpb.Event

func WriteColoredText

func WriteColoredText(text string, size float64, isBold bool, color color.RGBA, duration int, blocking bool)

func WriteText

func WriteText(text string, size float64, isBold bool, duration int, blocking bool)

Types

type CustomSettings

type CustomSettings struct {
	RobotName           string `json:"RobotName"`
	ChatTarget          string `json:"ChatTarget"`
	LoggedInToChat      bool   `json:"LoggedInToChat"`
	LastChatMessageRead int32  `json:"LastChatMessageRead"`
	TTSEngine           int    `json:"TTSEngine"`
	TTSVoice            string `json:"TTSVoice"`
	CurrentGamedata     string `json:"CurrentGamedata"` // Put current game JSON data here, so that it will be preserved across multiple runs
}

func GetCustomSettings

func GetCustomSettings() *CustomSettings

type SDKConfigData

type SDKConfigData struct {
	TmpPath  string
	DataPath string
	NvmPath  string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL