dimensionalOS/dimos

GitHub: dimensionalOS/dimos

面向物理空间的机器人操作系统,原生集成 AI Agent,支持自然语言控制和多类型机器人硬件。

Stars: 703 | Forks: 142

banner_bordered_trimmed

面向物理空间的代理操作系统

[![Discord](https://img.shields.io/discord/1341146487186391173?style=flat-square&logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/dimos) [![Stars](https://img.shields.io/github/stars/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/stargazers) [![Forks](https://img.shields.io/github/forks/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/fork) [![Contributors](https://img.shields.io/github/contributors/dimensionalOS/dimos?style=flat-square)](https://github.com/dimensionalOS/dimos/graphs/contributors) ![Nix](https://img.shields.io/badge/Nix-flakes-5277C3?style=flat-square&logo=NixOS&logoColor=white) ![NixOS](https://img.shields.io/badge/NixOS-supported-5277C3?style=flat-square&logo=NixOS&logoColor=white) ![CUDA](https://img.shields.io/badge/CUDA-supported-76B900?style=flat-square&logo=nvidia&logoColor=white) [![Docker](https://img.shields.io/badge/Docker-ready-2496ED?style=flat-square&logo=docker&logoColor=white)](https://www.docker.com/) [硬件](#hardware) • [安装](#installation) • [Agent CLI & MCP](#agent-cli-and-mcp) • [蓝图](#blueprints) • [开发](#development) ⚠️ **预发布 Beta 版** ⚠️
# 简介 Dimensional 是面向通用机器人的现代操作系统。我们正在制定下一代 SDK 标准,并与大多数机器人制造商集成。 只需简单安装且无需 ROS,即可完全使用 Python 构建可在任何人形机器人、四足机器人或无人机上运行的物理应用程序。 Dimensional 原生支持 Agent —— 用自然语言“凭感觉编程”你的机器人,并构建(本地和托管)能与你的硬件无缝协作的多智能体系统。Agent 作为原生模块运行 —— 订阅任何嵌入式流,从感知(lidar、摄像头)和空间记忆到控制回路和电机驱动器。
Navigation Perception

Navigation and Mapping

SLAM, dynamic obstacle avoidance, route planning, and autonomous exploration — via both DimOS native and ROS
Watch video

Perception

Detectors, 3d projections, VLMs, Audio processing
Agents Spatial Memory

Agentive Control, MCP

"hey Robot, go find the kitchen"
Watch video

Spatial Memory

Spatio-temporal RAG, Dynamic memory, Object localization and permanence
Watch video
# 硬件

Quadruped

Humanoid

Arm

Drone

Misc

🟩 Unitree Go2 pro/air
🟥 Unitree B1
🟨 Unitree G1
🟨 Xarm
🟨 AgileX Piper
🟧 MAVLink
🟧 DJI Mavic
🟥 力矩传感器

🟩 稳定版 🟨 测试版 🟧 内测版 🟥 实验性
# 安装 ## 交互式安装 ``` curl -fsSL https://raw.githubusercontent.com/dimensionalOS/dimos/main/scripts/install.sh | bash ``` ## 手动系统安装 要设置您的系统依赖项,请遵循以下指南之一: - 🟩 [Ubuntu 22.04 / 24.04](docs/installation/ubuntu.md) - 🟩 [NixOS / 通用 Linux](docs/installation/nix.md) - 🟧 [macOS](docs/installation/osx.md) ## Python 安装 ### 快速入门 ``` uv venv --python "3.12" source .venv/bin/activate uv pip install 'dimos[base,unitree]' # 回放录制的四足机器人 session(无需硬件) # 注意:首次运行时会显示一个黑色的 rerun 窗口,同时从 LFS 下载约 75 MB 数据 dimos --replay run unitree-go2 ``` ``` # 安装 simulation 支持 uv pip install 'dimos[base,unitree,sim]' # 在 MuJoCo simulation 中运行四足机器人 dimos --simulation run unitree-go2 # 在 simulation 中运行人形机器人 dimos --simulation run unitree-g1-sim ``` ``` # 控制真实机器人(通过 WebRTC 的 Unitree 四足机器人) export ROBOT_IP= dimos run unitree-go2 ``` # 特色运行文件 | 运行命令 | 功能说明 | |-------------|-------------| | `dimos --replay run unitree-go2` | 四足机器人导航回放 — SLAM、代价地图、A* 规划 | | `dimos --replay --replay-dir unitree_go2_office_walk2 run unitree-go2-temporal-memory` | 四足机器人时序记忆回放 | | `dimos --simulation run unitree-go2-agentic-mcp` | 仿真环境下的四足机器人智能体 + MCP 服务器 | | `dimos --simulation run unitree-g1` | MuJoCo 仿真中的人形机器人 | | `dimos --replay run drone-basic` | 无人机视频 + 遥测回放 | | `dimos --replay run drone-agentic` | 无人机 + 具备飞行技能的 LLM Agent(回放) | | `dimos run demo-camera` | 网络摄像头演示 — 无需硬件 | | `dimos run keyboard-teleop-xarm7` | 键盘遥操作模拟 xArm7(需要 `dimos[manipulation]` 额外组件) | | `dimos --simulation run unitree-go2-agentic-ollama` | 带有本地 LLM 的四足机器人智能体(需要 [Ollama](https://ollama.com) + `ollama serve`) | # Agent CLI 和 MCP `dimos` CLI 管理完整生命周期 —— 运行蓝图、检查状态、与 Agent 交互,以及通过 MCP 调用技能。 ``` dimos run unitree-go2-agentic-mcp --daemon # Start in background dimos status # Check what's running dimos log -f # Follow logs dimos agent-send "explore the room" # Send agent a command dimos mcp list-tools # List available MCP skills dimos mcp call relative_move --arg forward=0.5 # Call a skill directly dimos stop # Shut down ``` # 用法 ## 将 DimOS 用作库 请参阅下面的简单机器人连接模块示例,该模块向机器人发送连续的 `cmd_vel` 流,并将 `color_image` 接收到一个简单的 `Listener` 模块。DimOS 模块是机器人上的子系统,它们使用标准化消息与其他模块通信。 ``` import threading, time, numpy as np from dimos.core.blueprints import autoconnect from dimos.core.core import rpc from dimos.core.module import Module from dimos.core.stream import In, Out from dimos.msgs.geometry_msgs import Twist from dimos.msgs.sensor_msgs import Image, ImageFormat class RobotConnection(Module): cmd_vel: In[Twist] color_image: Out[Image] @rpc def start(self): threading.Thread(target=self._image_loop, daemon=True).start() def _image_loop(self): while True: img = Image.from_numpy( np.zeros((120, 160, 3), np.uint8), format=ImageFormat.RGB, frame_id="camera_optical", ) self.color_image.publish(img) time.sleep(0.2) class Listener(Module): color_image: In[Image] @rpc def start(self): self.color_image.subscribe(lambda img: print(f"image {img.width}x{img.height}")) if __name__ == "__main__": autoconnect( RobotConnection.blueprint(), Listener.blueprint(), ).build().loop() ``` ## 蓝图 蓝图是关于如何构建和连接模块的指令。我们使用 `autoconnect(...)` 组合它们,该函数通过 `(name, type)` 连接流并返回一个 `Blueprint`。 如果由于变量名冲突或 `In[]` 和 `Out[]` 消息类型导致 `autoconnect()` 失败,蓝图可以被组合、重新映射,并且可以覆盖传输层。 下面是一个蓝图示例,将来自机器人的图像流连接到 LLM Agent 以进行推理和动作执行。 ``` from dimos.core.blueprints import autoconnect from dimos.core.transport import LCMTransport from dimos.msgs.sensor_msgs import Image from dimos.robot.unitree.go2.connection import go2_connection from dimos.agents.agent import agent blueprint = autoconnect( go2_connection(), agent(), ).transports({("color_image", Image): LCMTransport("/color_image", Image)}) # 运行 blueprint if __name__ == "__main__": blueprint.build().loop() ``` ## 库 API - [模块](docs/usage/modules.md) - [LCM](docs/usage/lcm.md) - [蓝图](docs/usage/blueprints.md) - [传输层](docs/usage/transports/index.md) — LCM、SHM、DDS、ROS 2 - [数据流](docs/usage/data_streams/README.md) - [配置](docs/usage/configuration.md) - [可视化](docs/usage/visualization.md) ## 演示 DimOS Demo # 开发 ## 开发 DimOS ``` export GIT_LFS_SKIP_SMUDGE=1 git clone -b dev https://github.com/dimensionalOS/dimos.git cd dimos uv sync --all-extras --no-extra dds # 运行快速 test suite uv run pytest dimos ``` ## 多语言支持 Python 是我们的粘合剂和原型设计语言,但我们通过 LCM 互操作性支持多种语言。 查看我们的语言互操作示例: - [C++](examples/language-interop/cpp/) - [Lua](examples/language-interop/lua/) - [TypeScript](examples/language-interop/ts/)
标签:Agent系统, AI风险缓解, CUDA, Docker, MCP, Nix, NixOS, PyRIT, Python, ROS替代方案, Vectored Exception Handling, Vibe Coding, 人形机器人, 具身智能, 四足机器人, 多智能体系统, 安全防御评估, 无人机, 无后门, 本地部署, 机器人SDK, 机器人操作系统, 物理空间操作系统, 网络调试, 自动化, 自然语言编程, 请求拦截, 逆向工具