Navi Quadruped Robot SDK
Navi 四足机器人 SDK
Navi is FF's compact quadruped robot lineup (Dev / Mini, multiple variants). Beyond standard motion
and state capabilities, its signature feature is the dedicated session.navi.* namespace:
over a hundred extended actions (bow / wave / spin / dance), deeply tunable gait and motion
parameters, plus peripheral control (some extras such as expression / volume depend on the firmware build).
Navi 是 FF 紧凑型四足机器人产品线(Dev / Mini 多变体)。除了标准的运动与状态能力,
它最大的特色是 session.navi.* 专属命名空间:上百个扩展动作
(鞠躬 / 招手 / 转圈 / 舞蹈)、可深度调节的步态与运动参数、外设控制(表情 / 音量等部分扩展依固件版本而定)。
01Overview & Capability Matrix概览与能力矩阵
| Capability能力域 | Method方法 | Status状态 | Notes说明 |
|---|---|---|---|
motion | cmd_vel() | ✅ live | Velocity control速度控制 |
stand() / damping() | ✅ live | Stand / damping (internally mapped to extended actions)站立 / 阻尼(内部映射扩展动作) | |
do_preset() | ✅ live | mode names like stand / damping / passivestand / damping / passive 等模式名 | |
state | battery() / status() / joint_states() | ✅ live | Full telemetry全套遥测 |
pose() | ❌ | No SLAM, CapabilityNotSupported无 SLAM,CapabilityNotSupported | |
navi ★ | do_action() / set_gait() / set_foot_height() … | ✅ live | Platform-specific extensions, see Extended Action Library平台专属扩展,见 扩展动作库 |
display | set_led() | 🟡 partial部分 | LED effects live; screen (navi.set_screen()) absent on audited a100_dev firmware (2026-06-15)灯效 live;屏幕(navi.set_screen())审计固件 a100_dev(2026-06-15)未提供 |
navigation | goto() | 🟡 partial部分 | In progress对接中 |
audio / vision / arm / checkin | — | ❌ | navi.set_volume() absent on audited a100_dev firmware; the rest N/A for this form factornavi.set_volume() 审计固件未提供;其余本形态不适用 |
motion / state) and ff_sdk.skills.*;
for Navi-specific play (extended actions / gait tuning / expressions) use session.navi.* ——
the latter is explicitly platform-specific and not portable across platforms.
跨机器人代码用标准能力(motion / state)和 ff_sdk.skills.*;
Navi 专属玩法(扩展动作 / 步态调参 / 表情)用 session.navi.* ——
后者明确是 platform-specific,换平台不可移植。
02Installation安装
# On the robot (aarch64)
pip install wheels/ff_sdk-0.1.0a2-cp310-cp310-linux_aarch64.whl
# On a Linux dev machine (x86_64)
pip install wheels/ff_sdk-0.1.0a2-cp310-cp310-linux_x86_64.whl
python -c "import ff_sdk; print(ff_sdk.__version__)"
# 在机器人上(aarch64)
pip install wheels/ff_sdk-0.1.0a2-cp310-cp310-linux_aarch64.whl
# 在 Linux 开发机上(x86_64)
pip install wheels/ff_sdk-0.1.0a2-cp310-cp310-linux_x86_64.whl
python -c "import ff_sdk; print(ff_sdk.__version__)"
Navi talks to the robot over WebSocket; put your dev machine on the same LAN as the robot and you can control it —— this is the smoothest remote-development experience of the four platforms.
Navi 经 WebSocket 与机器人通信,开发机与机器人同一局域网即可控制 —— 这是四个平台里 远程开发体验最顺的一个。
⚠️ do_action() needs roslibpy>=1.6,<2 — roslibpy 2.x removed the actionlib module, and the extended action library (wave / dance / all performance actions) runs over actionlib. Telemetry and setters work on any roslibpy version. The wheel already pins this; if you install roslibpy yourself, keep it below 2.0.
⚠️ do_action() 需 roslibpy>=1.6,<2 —— roslibpy 2.x 删除了 actionlib 模块,扩展动作库(招手 / 跳舞 / 全部表演动作)走 actionlib。telemetry 和 setter 在任意 roslibpy 版本可用。wheel 已 pin 此约束;若自行安装 roslibpy,请保持 2.0 以下。
03Quickstart快速开始
import asyncio, ff_sdk
async def main():
async with await ff_sdk.connect("NV-DEMO") as dog:
print(dog.diagnose())
# —— standard capabilities (same code across platforms) ——
await dog.motion.stand() # stand ready
await asyncio.sleep(6)
await dog.motion.cmd_vel(linear=0.2) # move forward
await asyncio.sleep(2)
await dog.motion.stop()
battery = await dog.state.battery()
print(f"battery {battery.percent:.0%}")
# —— Navi dedicated extensions ——
nv = dog.navi
actions = await nv.list_actions() # all available extended actions
await nv.do_action(20542) # wave
await nv.set_foot_height(0.08) # raise foot height
await dog.motion.damping() # wrap up
asyncio.run(main())
import asyncio, ff_sdk
async def main():
async with await ff_sdk.connect("NV-DEMO") as dog:
print(dog.diagnose())
# —— 标准能力(跨平台同一套写法)——
await dog.motion.stand() # 站立就绪
await asyncio.sleep(6)
await dog.motion.cmd_vel(linear=0.2) # 前进
await asyncio.sleep(2)
await dog.motion.stop()
battery = await dog.state.battery()
print(f"电量 {battery.percent:.0%}")
# —— Navi 专属扩展 ——
nv = dog.navi
actions = await nv.list_actions() # 全部可用扩展动作
await nv.do_action(20542) # 招手
await nv.set_foot_height(0.08) # 抬高抬脚
await dog.motion.damping() # 收尾
asyncio.run(main())
damping() (damping reset) first, then stand() (stand ready),
and only then can it walk and run extended actions. Skip this step and motion commands may be ignored by the underlying state machine.
刚开机的机器人先 damping()(阻尼复位)再 stand()(站立就绪),
之后才能行走和做扩展动作。跳过这一步,运动指令可能被底层状态机忽略。
04Connect / Variants / Config连接 / 变体 / 配置
Variants & target prefix变体与 target 前缀
The Navi lineup has three variants with an identical API, selected by target prefix (or config):
Navi 产品线有三个变体,API 相同,通过 target 前缀(或配置)选择:
| Variant变体 | target formtarget 写法 | Notes说明 |
|---|---|---|
| Dev (default ⭐)(默认 ⭐) | NV-<sn> or或 NV-A100-<sn> | Developer-edition quadruped; full extended actions / parameter tuning unlocked开发者版四足,扩展动作 / 参数调节全量开放 |
| DevQ (legacy dev edition)(旧款开发版) | NV-DevQ-<sn> | Uses the compatibility control path走兼容控制路径 |
| Mini (consumer edition)(消费版) | NV-Mini-<sn> | Compact model for consumer scenarios面向消费场景的紧凑款 |
Environment variables环境变量
| Variable变量 | Default默认 | Notes说明 |
|---|---|---|
FF_SDK_NAVI_HOST | Robot default address机器人默认地址 | Robot IP (set when joining your LAN)机器人 IP(接入你的局域网时填) |
FF_SDK_NAVI_PORT | 9090 | Control channel (WebSocket) port控制通道(WebSocket)端口 |
FF_SDK_DRY_RUN | off关 | Set 1 for dry-run mode设 1 干跑模式 |
FF_SDK_TRANSPORT_TIMEOUT | 5.0 | Per-operation timeout (seconds)单次操作超时(秒) |
from ff_sdk import Config
cfg = Config.from_env()
cfg.extra["navi_host"] = "192.168.1.77"
cfg.extra["navi_variant"] = "a100_dev" # a100_dev | devq | mini
dog = await ff_sdk.connect("NV-DEMO", config=cfg)
from ff_sdk import Config
cfg = Config.from_env()
cfg.extra["navi_host"] = "192.168.1.77"
cfg.extra["navi_variant"] = "a100_dev" # a100_dev | devq | mini
dog = await ff_sdk.connect("NV-DEMO", config=cfg)
05Session & LifecycleSession 与生命周期
| Member成员 | Type类型 | Notes说明 |
|---|---|---|
session.motion / .state / … | Capability accessor能力访问器 | Raises CapabilityNotSupported when unsupported不支持时 raise CapabilityNotSupported |
session.navi ★ | Extension namespace扩展命名空间 | Dev variant only; None on other variants仅 Dev 变体;其他变体为 None |
session.capabilities() | set[str] | Set of supported capability domains支持的能力域集合 |
session.diagnose() | DiagnosticReport | Health check (control-channel connectivity)健康体检(控制通道连通性) |
await session.e_stop(reason) | — | Emergency stop紧急停止 |
await session.close() | — | Disconnect断开连接 |
e_stop() currently issues ACTION_ID_ESTOP=0, which is not yet verified on the audited a100_dev firmware (2026-06-15) and may be a no-op. The session-layer state machine (→ ESTOPPED + blocking later calls) always works, but do not rely on e_stop() as a hardware-level emergency stop — Navi's true hardware e-stop is the physical button on the remote. Verify on your robot before trusting it.
Navi 的 e_stop() 当前下发 ACTION_ID_ESTOP=0,该动作在审计固件(a100_dev,2026-06-15)上尚未真机证实,可能为 no-op。Session 层状态机(→ ESTOPPED 并拦截后续调用)始终生效,但不要把 e_stop() 当硬件级急停依赖 —— Navi 真正的硬件急停是遥控器上的物理按键。上真机请先验证。
nv = dog.navi
if nv is None:
print("this variant has no extended namespace (Mini / DevQ)")
else:
await nv.do_action(20542)
nv = dog.navi
if nv is None:
print("此变体不提供扩展命名空间(Mini / DevQ)")
else:
await nv.do_action(20542)
06motion · Motion Control运动控制
| Method方法 | Notes说明 |
|---|---|
await motion.cmd_vel(linear, angular, lateral) | Velocity control (m/s, rad/s)速度控制(m/s, rad/s) |
await motion.stand() | Stand ready (internally mapped to an extended action, ~6s)站立就绪(内部映射扩展动作,约 6s) |
await motion.damping() | Damping / soft e-stop (also zeroes velocity)阻尼 / 软急停(同时清零速度) |
await motion.stop() | Stop moving停止移动 |
await motion.do_preset(name) | mode names like stand / stand_up / damping / passive / estopstand / stand_up / damping / passive / estop 等模式名 |
import math
await dog.motion.stand()
await asyncio.sleep(6)
for _ in range(4): # walk a square
await dog.motion.cmd_vel(linear=0.25) # go straight
await asyncio.sleep(3)
await dog.motion.cmd_vel(angular=math.pi/4) # turn 90° in place
await asyncio.sleep(2)
await dog.motion.stop()
import math
await dog.motion.stand()
await asyncio.sleep(6)
for _ in range(4): # 走一个正方形
await dog.motion.cmd_vel(linear=0.25) # 直行
await asyncio.sleep(3)
await dog.motion.cmd_vel(angular=math.pi/4) # 原地转 90°
await asyncio.sleep(2)
await dog.motion.stop()
07state · State Telemetry状态遥测
| Method方法 | Status状态 | Notes说明 |
|---|---|---|
await state.battery() | ✅ | percent(0–1) / voltage / is_charging |
await state.status() | ✅ | RobotStatus state machineRobotStatus 状态机 |
await state.joint_states() | ✅ | Standard joint telemetry (names / positions / velocities / efforts)标准关节遥测(names / positions / velocities / efforts) |
await state.pose() | ❌ | No SLAM, CapabilityNotSupported无 SLAM,CapabilityNotSupported |
08navi.do_action · Extended Action Library ★navi.do_action · 扩展动作库 ★
Navi ships 134 built-in extended actions (the library may grow or shrink with firmware updates).
list_actions() returns the authoritative action list (ID + name) for this specific robot ——
run it once before writing code. Needs roslibpy<2 (actionlib).
Navi 内置 134 个扩展动作(动作库随固件更新可能增减)。
list_actions() 返回当前这台机器的权威动作清单(ID + 名称)——
写代码前先跑一次它。需 roslibpy<2(actionlib)。
Two real-machine notes (2026-06-28): (1) return_to_ready=True (default) auto-sends action_id 4 after the action so the dog returns to a neutral ready stance — without it an extended action holds its final pose indefinitely. (2) The list_actions() menu is not the complete set: some stunt IDs (e.g. 516 = punch) are reachable via do_action() but not advertised in the menu — the controller knows them.
两条真机说明(2026-06-28):(1)return_to_ready=True(默认)会在动作后自动补发 action_id 4 让狗回到中性就绪姿态——不补的话扩展动作会一直保持最后姿势不收。(2)list_actions() 菜单并非全集:部分特技 ID(如 516 = 出拳)可经 do_action() 触发但不在菜单广播里——控制器认得它们。
Common action IDs常用动作 ID
action_id |
Action动作 | Notes说明 |
|---|---|---|
0 | Damping / e-stop阻尼 / 急停 | Joints go limp, safe state关节松软,安全态 |
4 | Stand ready站立就绪 | Stand up and enter a walkable state起立并进入可行走状态 |
20510 | Bow鞠躬 | |
20525 | Turn 180° in place原地转身 180° | Leave space around周围留空间 |
20542 | Wave招手 | |
20567 | Shoulder dance抖肩舞 |
list_actions() before hardcoding an ID;
for cross-firmware code, look up the ID by action name before calling.
不同固件版本动作 ID 可能调整。硬编码 ID 前先 list_actions() 验证;
跨固件代码建议按动作名称查找 ID 再调用。
actions = await dog.navi.list_actions()
def find_id(actions, keyword: str) -> int | None:
for act in actions.items: # (id, name) list
if keyword in act.name:
return act.id
return None
wave_id = find_id(actions, "wave")
if wave_id is not None:
result = await dog.navi.do_action(wave_id, hold_time=4.0)
print(result)
actions = await dog.navi.list_actions()
def find_id(actions, keyword: str) -> int | None:
for act in actions.items: # (id, name) 列表
if keyword in act.name:
return act.id
return None
wave_id = find_id(actions, "wave")
if wave_id is not None:
result = await dog.navi.do_action(wave_id, hold_time=4.0)
print(result)
Parameters参数
| Parameter参数 | Default默认 | Notes说明 |
|---|---|---|
hold_time | 3.0 | Action hold / execution duration (seconds); increase for long actions (dances)动作保持 / 执行时长(秒),长动作(舞蹈)按需加大 |
priority | 25 | Action priority; higher priority can preempt an in-progress lower-priority action动作优先级,高优先级可抢占进行中的低优先级动作 |
09navi.set_* · Motion Parameter Tuning ★navi.set_* · 运动参数调节 ★
Tune gait and motion style in real time —— this is the “playability” that sets Navi apart from the other platforms:
实时调节步态与运动风格 —— 这是 Navi 区别于其他平台的“可玩性”所在:
| Method方法 | Parameter参数 | Notes说明 |
|---|---|---|
await navi.set_gait(gait_id) | int | Switch gait切换步态 |
await navi.set_foot_height(height_m) | meters米 | Foot lift height (higher clears more obstacles, uses more power)抬脚高度(越高越能跨障,越费电) |
await navi.set_user_mode(mode) | int | User mode用户模式 |
await navi.set_collision_protect(enabled) | bool | Collision-protection toggle碰撞保护开关 |
await navi.set_friction(friction) | float | Ground friction estimate (lower it on slippery floors to avoid slipping)地面摩擦系数估计(光滑地面调低防打滑) |
await navi.set_jump_distance(distance_m) | meters米 | Jump distance跳跃距离 |
await navi.set_jump_angle(angle_rad) | radians弧度 | Jump angle跳跃角度 |
Advanced setters (note: pending real-robot regression confirmation)进阶 setter(标注:待真机回归确认)
The following parameter interfaces are defined; their message structures are under ongoing real-robot validation —— tune in small steps and observe:
set_ground_model / set_free_leg / set_swing_traj_type /
set_controller_type / set_model_scale / set_swaying_duration /
set_swing_duration / set_velocity_decay / set_decelerate.
以下参数接口已定义,消息结构在持续真机验证中 —— 使用时建议小步调整并观察:
set_ground_model / set_free_leg / set_swing_traj_type /
set_controller_type / set_model_scale / set_swaying_duration /
set_swing_duration / set_velocity_decay / set_decelerate。
set_raw —— the escape hatchset_raw —— 逃生口
Send raw messages directly to low-level interfaces the SDK doesn't yet wrap. Use only when you know the message structure exactly —— a wrong structure may be ignored by the underlying layer or cause unexpected behavior.
对 SDK 尚未封装的底层接口直接发原始消息。仅在你明确知道消息结构时使用, 错误结构可能被底层忽略或产生预期外行为。
# grass: raise feet + conservative speed
await dog.navi.set_foot_height(0.08)
await dog.navi.set_collision_protect(True)
await dog.motion.cmd_vel(linear=0.15)
# 草地:抬高脚 + 保守速度
await dog.navi.set_foot_height(0.08)
await dog.navi.set_collision_protect(True)
await dog.motion.cmd_vel(linear=0.15)
10navi Convenience Methods ★navi 便利方法 ★
| Method方法 | Notes说明 |
|---|---|
await navi.play_emoji(name, hold_time=2.0) | Play an expression — ⚠️ absent on audited a100_dev firmware (2026-06-15), call times out播放表情 —— ⚠️ 审计固件 a100_dev(2026-06-15)未提供,调用会超时 |
await navi.set_volume(volume) | Volume (integer levels) — ⚠️ absent on audited a100_dev firmware (2026-06-15), call times out音量(整数档位)—— ⚠️ 审计固件 a100_dev(2026-06-15)未提供,调用会超时 |
await navi.self_charging(hold_time=60.0) | Autonomous recharge — ⚠️ absent on audited a100_dev firmware (2026-06-15), call times out自主回充 —— ⚠️ 审计固件 a100_dev(2026-06-15)未提供,调用会超时 |
await navi.do_dog_behavior(behavior, hold_time=3.0, **extra) | Behavior modes (act cute / roll over, etc.; per the list_actions catalog)行为模式(撒娇 / 打滚等,按 list_actions 清单) |
await navi.set_walking_style(style, **extra) | Walking style — ⚠️ absent on audited a100_dev firmware (2026-06-15), call times out行走风格 —— ⚠️ 审计固件 a100_dev(2026-06-15)未提供,调用会超时 |
await navi.set_motion_params(**params) | Batch motion parameters批量运动参数 |
await navi.set_screen(**params) | Screen display control — ⚠️ absent on audited a100_dev firmware (2026-06-15), call times out屏幕显示控制 —— ⚠️ 审计固件 a100_dev(2026-06-15)未提供,调用会超时 |
await navi.set_fan(duty_cycle=…, enable=…) | Cooling fan散热风扇 |
await navi.smart_action(name, **extra) | Smart behavior entry point智能行为入口 |
nv = dog.navi
await nv.do_action(20542, hold_time=4.0) # wave
await nv.do_action(20567, hold_time=8.0) # shoulder dance
await nv.do_action(20510, hold_time=4.0) # bow to close
await dog.motion.damping()
nv = dog.navi
await nv.do_action(20542, hold_time=4.0) # 招手
await nv.do_action(20567, hold_time=8.0) # 抖肩舞
await nv.do_action(20510, hold_time=4.0) # 鞠躬谢幕
await dog.motion.damping()
11Cross-platform Skills跨平台 Skills
from ff_sdk import skills
await skills.wave(dog) # auto-mapped to the "wave" extended action on Navi
await skills.bow(dog) # → "bow" extended action
await skills.greet(dog, "friend")
from ff_sdk import skills
await skills.wave(dog) # Navi 上自动映射为扩展动作“招手”
await skills.bow(dog) # → 扩展动作“鞠躬”
await skills.greet(dog, "朋友")
On Navi, skills internally route through navi.do_action(), but the caller never needs to care ——
the same line of code runs just as well on Aegis / Futurist.
skills 在 Navi 上内部走 navi.do_action(),但调用方完全不用关心 ——
同一行代码换到 Aegis / Futurist 照样跑。
12Errors & Diagnostics异常与诊断
| Exception异常 | When it's raised什么时候抛 |
|---|---|
FfSdkError | Root class of all SDK exceptions所有 SDK 异常的根类 |
ConnectionError / TransportError / TimeoutError | WebSocket connection / line / timeoutWebSocket 连接 / 线路 / 超时 |
PlatformError | Translation of low-level errors底层错误翻译 |
CapabilityNotSupported | Capability / variant not supported (e.g. accessing some extensions on Mini)能力 / 变体不支持(如 Mini 上访问部分扩展) |
EStopActiveError / StateError | E-stop active / state not allowed急停激活 / 状态不允许 |
report = dog.diagnose()
print(report) # control-channel connectivity, variant detection result
report = dog.diagnose()
print(report) # 控制通道连通性、变体识别结果
13Example Index示例索引
| Example示例 | Contents内容 |
|---|---|
01_hello_connect.py | First connection + diagnose + emergency stop第一次连接 + 诊断 + 紧急停止 |
02_diagnose.py | Health report walkthrough体检报告详解 |
03_estop.py | Emergency stop + callback + reset紧急停止 + 回调 + 重置 |
cookbook/context_manager.py | async with context managementasync with 上下文管理 |
cookbook/safety_watchdog.py | Safety watchdog安全看门狗 |
cookbook/multi_robot.py | Concurrent multi-robot control多机器人并发控制 |
cookbook/graceful_shutdown.py | Graceful shutdown优雅关闭 |
14FAQ / TroubleshootingFAQ / 排错
| Symptom现象 | Possible cause可能原因 | Fix解决 |
|---|---|---|
| Action commands ignored动作指令被忽略 | Unlock sequence skipped没走解锁顺序 | Call damping() then stand(); wait until stable before sending actions先 damping() 再 stand(),等站稳后发动作 |
dog.navi is Nonedog.navi 是 None | Variant isn't Dev变体不是 Dev | The extension namespace is Dev-only; use standard motion capabilities扩展命名空间仅 Dev 变体提供;用标准 motion 能力 |
do_action(id) does nothingdo_action(id) 没反应 | ID doesn't exist on this firmware / was preempted by lower priorityID 在该固件不存在 / 被低优先级抢占 | Verify the ID with list_actions(); raise priority if needed先 list_actions() 验证 ID;必要时提高 priority |
| Can't connect连不上 | Not on the same LAN / port unreachable不在同一局域网 / 端口不通 | Check FF_SDK_NAVI_HOST / FF_SDK_NAVI_PORT; ping first, then connect核对 FF_SDK_NAVI_HOST / FF_SDK_NAVI_PORT,ping 通再连 |
state.pose() errorsstate.pose() 报错 | No SLAM无 SLAM | Expected behavior, catch CapabilityNotSupported预期行为,捕获 CapabilityNotSupported |