from innate import Battery, MainImage, Odometry, Skill
class MySkill(Skill):
image: MainImage # required: the run fails up front if it's missing
odom: Odometry
battery: Battery | None # optional: None when there's no reading
Feeds
| Declaration | Contents |
|---|---|
image: MainImage | Head camera frame. It’s a base64 JPEG string; .jpeg gives bytes. |
wrist_image: WristImage | Wrist camera frame, same format |
depth: DepthMap | Depth as a (height, width) numpy array |
odom: Odometry | .position (x, y), .theta, .theta_degrees, .linear_velocity, .raw |
pose: Pose | None | Same shape as Odometry, in the map frame. None until localized. |
map: Map | .grid (-1 unknown, 0 free, 100 occupied), .resolution, origin |
battery: Battery | .percentage (0–1), .voltage, .current, .charging |
lidar: Lidar | Ranges and angles. .min_range(-30, 30) gives the closest hit ahead. |
arm: Arm | Gripper pose: .position, .rpy, .pitch, .gripper |
joint_states: JointStates | Arm joints. .of("j4") gives position, velocity, effort. |
head_position: HeadState | .pitch_degrees, negative is down |
Odometry or pose?
odom: Odometry | pose: Pose | |
|---|---|---|
| Frame | Where the robot thinks it drove since boot | Where it is on the saved map |
| Behavior | Drifts slowly, never jumps | Corrects itself, so it can jump |
| Use for | Relative moves: “forward 0.4 m” | Places on the map |
Example
import math, time
from innate import Odometry, Skill
class MeasureDistance(Skill):
odom: Odometry
def guidelines(self) -> str:
return "Use to report how far the robot moves over a few seconds."
def execute(self, seconds: float = 5.0):
x0, y0 = self.odom.position
end = time.time() + seconds
while time.time() < end:
self.sleep(0.5)
x, y = self.odom.position
return f"Moved {math.hypot(x - x0, y - y0):.2f} m"

