Kenate

API Reference

Standard Library

Pre-built logic modules for the most common robotic behaviors. Import from kenate.lib.

kenate.lib.Motion

High-level movement commands that handle ramp-up and ramp-down internally.

move_smooth(distance, speed)

Moves a set distance with s-curve acceleration.

rotate_fixed(angle, speed)

Rotates the robot on its axis using IMU feedback.

WaitState

WaitState(duration)

Provides precision timed pauses without blocking the control loop.

SequenceState

SequenceState([states])

Chains multiple behaviors into a single autonomous flow.

PIDState

PIDState(p, i, d, t)

Industry-standard math for smooth, precise motor positioning.

WatchdogState

WatchdogState(timeout)

A background safety guardian that monitors system health.

BlackBoxLogger

BlackBoxLogger()

Captures high-frequency (1000Hz) telemetry data for post-mission analysis.

TerminalVisualizer

TerminalVisualizer(id)

A live-updating console dashboard for real-time mission monitoring.

Advanced Pattern: Observer Watchdog

Instead of writing safety logic inside every state, instantiate a WatchdogState as an attribute of your primary Task state. This separates the Mission Goal from the System Safety.

The Pattern

from kenate.lib import Motion, Safety

class PatrolState(kenate.BaseState):
    def on_update(self):
        # Use lib instead of raw motor math
        Motion.move_smooth(1.0, 0.5)