Introduction
What is Kenate?
Kenate is "React for Robots": a framework that helps you build complex robot behaviors by breaking them down into small, isolated States, not one giant script.
Engineering Note
If you're used to writing `while True:` loops in Python with everything jammed together, this might feel different at first. But once you taste modularity, you won't go back.
The Problem
Traditional robotics code is one giant script. You write a massive main.py with a while True: loop that handles everything: sensor reading, motor control, state transitions, error handling. One typo and the whole thing falls over.
The Solution
Kenate forces you to think in States. Each behavior is a separate Python class: PatrolState, AlertState, IdleState. Each state only cares about itself. The Kenate Engine handles the rest.
Key Features
Hybrid Power
Write easy Python. A C++ Engine runs at 1000Hz under the hood for precise timing.
Deterministic
Guaranteed, exact timing intervals. Critical for smooth robot motion.
Modular
If 'Attack' is broken, fix AttackState.py. You can't break 'Patrol' by accident.
A Quick Taste
import kenate
class PatrolState(kenate.BaseState):
def on_enter(self):
self.log("Starting patrol...")
def on_update(self):
self.set_motor_speed(0, 50)
self.set_motor_speed(1, 50)
if self.get_distance(0) < 30:
self.change_state("Alert")