Kenate

API Reference

Motor API

The MotorInterface gives you standard commands for all actuators, meaning you don't have to write custom bit-banging garbage just to make a wheel spin. You're welcome.

kenate.BaseState()

The foundation for your behaviors. I give you these methods out of the box so you don't spend three days reinventing the wheel.

get_height_sensor()

Returns current altitude/height in millimeters.

get_distance_sensor()

Returns obstacle proximity (0-100 range).

get_battery_level()

Returns battery percentage (0-100).

get_system_temperature()

Returns core temperature in Celsius (Kernel-polled).

on_enter() / on_update() / on_exit()

The core state lifecycle hooks (1ms heartbeat).

kenate.Robot()

The high-level manager for mission execution.

create_state(name, class)

Registers a behavior in the engine's state table.

start()

Commencing the mission heartbeat.

stop()

Terminates the mission safely (Actuator Lock).

The Mock Motor

For when you want to write code from your couch instead of the lab. kenate.MockMotor() simulates the hardware perfectly in software, so you don't need the actual robot just to test a loop.

# Prototyping without a robot
motor = kenate.MockMotor()
motor.set_velocity(0.8)
print(motor.get_velocity()) # Returns 0.8 simulated