Menlo
Python SDK

Command Line

menlo: save a robot, check it, and stand, walk, stop and damp it from a terminal.

pip install menlo-sdk installs the menlo command. It saves robots for the SDK and drives one through the same verbs a script uses. stand, walk and damp show what they are about to do and ask before they send anything. stand and walk run the readiness check for their action first and say why when the robot cannot do it now. stop sends at once and refuses only when state is stale or the link is lost. damp has no readiness check: it sends DAMP whatever the robot's state.

menlo --robot NAME --mode {udp,hybrid,livekit} <command>
menlo --version
menlo <command> -h

--robot picks a saved robot, --mode overrides its connection mode for this command. Without them, the command uses MENLO_ROBOT, then the default saved robot, then the only saved robot.

Setup

menlo setup

The wizard asks for a name, a connection mode, and only the fields that mode needs: the robot's address for udp, the Asimov Manager URL and an SDK credential for livekit, both for hybrid. The credential is typed masked and never printed back. Each field is checked live before it is saved:

CheckWhat passes
Credentialaccepted, role control, room robot-...; a credential with the Observe role saves with a warning: it can watch, not drive over livekit
udpstate arrives from the address; the message names the robot mode it saw
livekitthe room is joined; the message lists the tracks it found

A failed check asks "Save anyway?". When another robot is already the default, the wizard asks whether this one should be. --no-check skips the live checks. The wizard needs a terminal; without one it exits 2. SDK credentials come from the Developer page in Asimov Manager.

Saved robots live in ~/.menlo/robots.toml, readable only by you.

Robots

menlo robots                 # table: default mark, name, mode, address, manager, room
menlo robots add lab --mode hybrid --udp 192.168.1.20 --manager https://manager.example --credential ...
menlo robots add lab --limits 0.3,0.3,0.6
menlo robots use lab
menlo robots remove lab

add on an existing name keeps the saved values it is not given, so the second add above only sets limits. Flags it needs and does not have are asked for in a terminal; with --no-input, missing flags exit 2. --default makes the robot the default; --no-check skips the live check. With every flag it needs, or with --no-input, a failed check saves nothing and exits 1; in the wizard, you can choose to save despite a failed check. use and remove exit 1 on a name that is not saved.

Status

menlo status
menlo status --watch

Connects, reads state for a second, and prints a panel: the robot, its connection mode and address; a badge READY, NOT READY or FAULTED with the first blocking reason; the robot mode and whether it is armed; battery; the hottest joint; faults; the state rate; and whether the state is fresh. It sends nothing. --watch refreshes until q or Ctrl-C.

Stand, Walk, Stop, Damp

menlo stand
menlo walk --vx 0.2 --duration 3
menlo walk --vyaw 0.3 --duration 2
menlo stop
menlo damp
CommandWhat it does
standrefuses from MOVE; a robot already in STAND is left alone; otherwise asks, sends stand(), waits up to 5 s for STAND and 5 s more for arming, then prints Armed: ready to walk. Exit 3 when it does not arm
walk--duration is required, above 0 and at most 10 s; at least one of --vx, --vy, --vyaw must be nonzero. A robot in STAND gets up to 5 s to be seen armed. Asks, checks again, holds the velocity for the duration, and always sends stop() before it exits. Ctrl-C stops and exits 130. A fault that ends the walk early is named, with a note that it latches until the firmware restarts, and exits 3
stopnever asks. In MOVE, sends zero velocity twice, 0.1 s apart; in STAND or DAMP sends nothing. Refuses on stale state. A script that holds a velocity re-sends it at 10 Hz and must itself be stopped
dampasks, sends damp() and waits for DAMP

damp is not an emergency stop

DAMP makes every actuator compliant: a standing robot folds to the ground. Use the robot's physical stop for an emergency; see Stopping the Robot.

Confirm Before Sending

stand, walk and damp print one line: the robot, its connection mode and address, its robot mode, battery, and what will happen. Then they ask Proceed? [y/N].

$ menlo walk --vx 0.2 --duration 3
lab (hybrid, 192.168.22.32) · STAND, armed · battery 82 % → walk vx 0.20 m/s, vy 0.00 m/s, vyaw 0.00 rad/s for 3.0 s, then stop
Proceed? [y/N] y
Walking. Ctrl-C stops.
Stopped. Robot mode MOVE.
$ menlo stand
lab (udp, 192.168.22.32) · DAMP · battery 82 % → stand, then wait until armed
Proceed? [y/N]
$ menlo damp
lab (udp, 192.168.22.32) · MOVE · battery 82 % → damp: every actuator goes limp and a standing robot folds. Not an emergency stop; use the robot's physical stop for that.
Proceed? [y/N]
  1. Read the line. A speed above the robot's velocity limits shows the value that is sent, then the one you asked for, for example vx 0.40 m/s (asked 0.60).
  2. Type y and press Enter to go ahead. Enter alone, or anything else, cancels: the command prints Cancelled; nothing sent. and exits 4.

-y or --yes prints the line and goes ahead without asking. With no terminal to ask on and no --yes, the command sends nothing and exits 2.

Not Feasible

When the readiness check refuses, stand and walk do not ask. They print Not feasible:, the robot mode, the reason and the fix on stderr, and exit 3:

Not feasible: lab is in DAMP, not balancing. Run `menlo stand` first.
Not feasible: lab is in STAND, not armed. STAND has not been held upright for 0.5 s; the firmware accepts MOVE after that. Run the command again once `menlo status` shows it armed.
Not feasible: lab is in MOVE, balancing. `stand` only runs from DAMP; end a walk with `menlo stop`.
Not feasible: lab is in DAMP, faulted. The firmware latched DAMP (FALL_DETECTED); it stays latched until the firmware restarts.
Not feasible: no fresh state from lab: the latest state is 1.2 s old (limit 0.5 s). Check the link with `menlo status`.

The robot can change while you read the line. walk runs the check again after you answer; if the robot can no longer walk, it prints Not feasible: and sends nothing.

For Scripts and Agents

menlo robots --json and menlo status --json print one JSON object and nothing else. --yes runs stand, walk and damp without a question; branch on the exit code.

menlo status --json | jq '.ready, .problems'
menlo walk --vx 0.2 --duration 3 --yes

status carries robot, mode, host, verdict, ready, problems (each with code, message, blocking), robot_mode, armed, battery_percent, faults, error_flags, max_joint_temp_c, state_rate_hz, state_age_s and fresh. robots carries default and a robots list with name, default, mode, udp_host, manager_url, room, credential_saved and limits; the credential itself is never printed.

Exit Codes

CodeMeaning
0done
1an error; the message is menlo <command>: <message> on stderr
2usage: a missing flag, a bad value, a wizard without a terminal, or a question with no terminal and no --yes
3not feasible: the readiness check refused (Not feasible: and the reason are printed), the robot did not become ready, or a fault ended a walk
4cancelled: you answered no; nothing was sent
130interrupted with Ctrl-C

How is this guide?

On this page