Menlo
Python SDK

Examples

The runnable scripts that ship with the SDK, grouped by what they show.

Each file is one short, runnable script, kept in the examples directory of the SDK repository. Examples without a connection mode in their name use the saved robot (menlo setup); set MENLO_ROBOT=NAME to pick another. Read the docstring at the top of a file before you run it: it says what the robot must be doing.

git clone https://github.com/menloresearch/menlo-sdk.git
cd menlo-sdk
python examples/07_read_state.py

Connect

ScriptWhat it shows
01_connect_udp.pyudp from an address on the robot's network; no SDK credential
02_connect_hybrid.pyhybrid: udp drive and state, LiveKit media, from the robot's address, its Asimov Manager URL and MENLO_CREDENTIAL
03_connect_livekit.pylivekit from anywhere, with the SDK credential

Move Safely

ScriptWhat it shows
04_preflight.pypreflight("move"): every reason the robot is not ready, without sending anything
05_stand_and_walk.pystand(), wait_ready("move"), a bounded set_velocity(wait=True)
06_stop_and_shutdown.pycutting a hold short with stop(), and damp() on a supported robot

State

ScriptWhat it shows
07_read_state.pyrobot.state, robot.armed, the hottest joint, and the mode and alert callbacks

Joints

ScriptWhat it shows
08_move_joints.pygoto() on one named joint, on a supported robot, then DAMP

Media

ScriptWhat it shows
09_camera_and_audio.pya photo, a clip with audio, and a tone on the speaker

Recording

ScriptWhat it shows
10_record_and_replay.pyrobot.record() for three seconds, then reading the file back

Without the SDK

ScriptWhat it shows
11_raw_livekit.pythe protocol itself: a room token, one RobotCommand on the commands topic, state from the state track

Apps

ScriptWhat it shows
apps/agent_room.pythe SDK half of a voice or vision agent: look() saves a photo, walk() is a bounded velocity
apps/follow_the_ball.pya camera-driven walk: fresh frame or stop(), short holds, hybrid or livekit, needs numpy
  • Quickstart: the first script, step by step
  • Command Line: the same verbs without writing a script

How is this guide?

On this page