This release is a pre-release and may not be stable for production use.
menlo-sdk
Drive an Asimov robot from Python. One Robot, five verbs, waits that read the robot's own
report, and camera, microphone and speaker on the same connection.
pip install menlo-sdk # UDP on the LAN; Python 3.12+
pip install "menlo-sdk[livekit]" # + video, audio and remote connections
Quickstart
Once per machine, save a robot. The credential is minted on the robot
(asimovctl sdk-token create --role control, or its web UI's SDK page):
menlo login http://asimov.local --credential <credential>
Then a script is just:
from menlo.asimov import Mode, Robot
with Robot().connect() as robot: # the robot you logged in to
if robot.state.mode is Mode.DAMP: # wake up: STAND is the only way out of DAMP
robot.stand()
robot.wait_for(Mode.STAND, timeout=15)
robot.set_velocity(vx=0.25, duration=4.0, wait=True) # walk 0.25 m/s for 4 s, then zero
robot.wait_for(Mode.MOVE) # ends in MOVE at zero velocity: standing still
print(robot.state.joint("L_Knee").pos, robot.state.battery)
print(robot.camera.photo().to_jpeg()[:4]) # needs [livekit] and Pillow
Robot() finds the robot from MENLO_MANAGER_URL + MENLO_CREDENTIAL, else from
~/.menlo/robots.toml (menlo robots, menlo use <name>, menlo logout <name>).
Or say where it is: Robot(ConnectionConfig(udp=UdpConfig("asimov.local"))).connect("udp").
The verbs
| Verb | What it does |
|---|---|
set_velocity(vx, vy, vyaw, duration=, wait=) |
walk; held at 10 Hz until superseded, stop(), or duration |
stop() |
zero velocity; the robot keeps balancing in MOVE |
stand() |
stiffen into the standing pose; the wake-up verb, no balance loop |
damp() |
motors compliant now; a standing robot folds. The emergency verb |
goto(positions, duration=) / trajectory(positions) |
joint targets, radians, policy off |
Every verb returns a Sent at once. wait_for(Mode.X) and wait_until(pred) block on the
robot's report and raise RobotFaultedError, StateStaleError or WaitTimeoutError
instead of guessing. robot.state is the latest sample: mode, joints, IMU, alerts, battery.
Three lanes, one API
connect(mode) |
control + state | video + audio | when |
|---|---|---|---|
"udp" |
UDP 8850 / 8851 | — | on the robot's LAN, no camera needed |
"hybrid" |
UDP | LiveKit | on the LAN, with camera |
"livekit" |
LiveKit | LiveKit | from anywhere the robot's manager is reachable |
ManagerConfig(url, credential) asks the robot's manager for the room and a fresh join
token on every connect; the SDK never holds a LiveKit secret.
Read before you let go of the robot
- A walk ends in MOVE at zero velocity, not in
stand(). STAND is a stiffen with no balance loop; asking a free-standing biped to stiffen after walking tips it over. - The SDK sends zero when your script stops.
close(), the end of awithblock, a lost link and a fault-DAMP all release a held velocity. The edge DAMPs on its own about two seconds after the last command it heard. damp()folds the robot. It is never implied by anything else.- Speeds are clamped client-side (0.6 m/s, 1.5 rad/s by default) and the clamp is visible
on
Sent.clamped.
More
- Reference: every option, the safety model in full, the wire, errors, development.
- SKILL.md: the two-page brief for an agent writing a script against this SDK.
- Examples and the changelog.
- Versions follow PEP 440; pre-releases (
0.1.0rc1) install only withpip install --pre. How releases are cut: RELEASING.md. - Found a security problem? Report it privately: SECURITY.md.
License
MIT. The wire types come from asimov-protocol (MIT).
Release files for menlo-sdk 0.1.0rc4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| menlo_sdk-0.1.0rc4.tar.gz | 183.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| menlo_sdk-0.1.0rc4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 258.6 kB
Release files / menlo_sdk-0.1.0rc4.tar.gz
| Download URL | menlo_sdk-0.1.0rc4.tar.gz |
|---|---|
| Size | 183.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf6fa3109c6bf88b4c6f33ed03803867a9cdd6fff08f8306ce98de7353fb9ffc
|
|
BLAKE2b-256 checksum How to use checksums |
1f01228e906d09d0110e704282b88cd4770258f427bf60ced6e04f08a74166f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / menlo_sdk-0.1.0rc4-py3-none-any.whl
| Download URL | menlo_sdk-0.1.0rc4-py3-none-any.whl |
|---|---|
| Size | 75.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ca26119c2835a75b0c55201accfcb4bd5e2184886129f9aea43164d14a46af9
|
|
BLAKE2b-256 checksum How to use checksums |
d48d00aca9fe9d2db3df24aac9889f143a22066234cd0a271c284cfd2a9c6836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log