Skip to main content

Reference policies

se3labs.eval.policy ships two policies for preflight, tests, and as SDK examples. Both satisfy the Policy protocol.

HoldStill(horizon=4, **manifest_kwargs)

Targets every joint where it is and leaves the gripper alone. Returns horizon identical actions per chunk. Extra keyword arguments go to default_manifest, so HoldStill(images=[("cam_chest", 640, 480)]) requests a camera stream.

Use it to confirm connectivity, negotiation, and latency before wiring a real model.

FunctionPolicy(fn, manifest=None)

Wraps a bare fn(observe) -> Sequence[msg.Action] | msg.EndEpisode with a default manifest.

from se3labs.eval import msg, policy


def act(observe: msg.Observe) -> list[msg.Action]:
targets = {a.name: (list(a.joint_pos_rad), None) for a in observe.observation.arms}
return [policy.joint_action(targets)]


policy.serve_policy("job_…", "relay:7443", policy.FunctionPolicy(act))

From the command line, --policy hold on se3labs eval run selects HoldStill.

The client API in se3labs.eval.policy

NamePurpose
serve_policy(job_id, address, policy, *, secure=False, timeout_s=None)Connect, run the whole session, return a SessionReport
get_status(job_id, address, *, secure=False, timeout_s=10.0)The latest msg.Status the relay holds for a job
joint_action(targets)Build one msg.Action from arm → (joints, gripper or None)
default_manifest(*, model, version, images, max_horizon, stateful)A msg.ClientManifest for joint_position_v1 with JPEG image requests
PolicyThe protocol a policy object satisfies: manifest, reset, act
SessionReportwelcome, episodes, steps, ended_by_policy, close_reason, errors
SessionRejectedRaised on Reject; carries the msg.Reject message
PROTOCOL_VERSIONThe protocol version this library speaks

To end an episode, act returns msg.EndEpisode(reason=""); the client fills in the episode id. Every protocol message and enumeration is available from se3labs.eval.msg.