Policies¶
A policy turns an observation into an action. Policy() takes a function, an ONNX skill, a LeRobot checkpoint, a policy server or a recorded episode.
A policy decides what the robot does next. Each step, it gets an observation and returns joint targets.
from strands_robots import Policy, Robot
arm = Robot("so101")
wave = Policy(lambda obs: {"shoulder_pan": 0.4})
arm.run(wave, seconds=2)
Policy() picks the right kind from what you pass:
| You pass | You get |
|---|---|
lambda obs: {...} |
Your function, called every step |
"microduck?skill=velstand&vx=0.3", "holosoma" |
An ONNX skill |
"lerobot/smolvla_base" |
A LeRobot checkpoint in this process |
"zenoh://gpu-box:7447/smolvla" |
A LeRobot policy on another machine |
"data/wave?episode=0" |
A recorded episode, replayed |
A function can return None to keep the last target for that step.
ONNX skills¶
The microduck has ten skills from Pollen Robotics. Pick one with a query string:

skill=velstand&vx=0.3 walk
skill=velstand&wz=1.2 turn
skill=roulade roll
skill=alpha_ground_pick reach downThe others are alpha_walking, alpha_stand, alpha_sitstand, ball_kick_left, ball_kick_right, roller
and roller_crouch. Policy("holosoma") makes a Unitree G1 stand and walk.
Let an agent pick skills¶
from strands import Agent
duck = Robot("microduck")
Agent(tools=[duck.tool])("walk forward a bit, turn left, do a roll, then stand still")
The agent chooses a skill and its parameters. It never sets joint positions. See Agent tools.
LeRobot¶
Teleoperate with a leader arm¶
Pass a LeRobot Teleoperator, or another Robot, to run(). The follower copies it:
The library converts each reading through both arms' calibration.
Edit page