pycozmo.emotions

Emotion representation and reading.

Functions

load_emotion_events(resource_dir)
load_emotion_types(resource_dir)

Classes

DecayGraph(nodes)
EmotionEvent(name, affectors, float]) EmotionEvent representation class.
EmotionType(name, decay_graph, …) Emotion type class.
Node(x, y)
class pycozmo.emotions.EmotionType(name: str, decay_graph: pycozmo.emotions.DecayGraph, repetition_penalty: pycozmo.emotions.DecayGraph, default_value: float = 0.0, min_value: float = -1.0, max_value: float = 1.0)

Bases: object

Emotion type class.

add(delta: float) → None
decay_graph
last_change
last_value
max
min
name
repetition_penalty
set(value: float) → None
update() → None

Update from decay function.

value
class pycozmo.emotions.EmotionEvent(name: str, affectors: Dict[str, float])

Bases: object

EmotionEvent representation class.

affectors
classmethod from_json(data: Dict[KT, VT])
name
pycozmo.emotions.load_emotion_types(resource_dir: str) → Dict[str, pycozmo.emotions.EmotionType]
pycozmo.emotions.load_emotion_events(resource_dir: str) → Dict[str, pycozmo.emotions.EmotionEvent]