🧪">

MIT Drake 仿真 · 左编辑程序 / URDF,右跑 Jupyter

⛶ 全屏打开 ← 返回首页
Jupyter 服务器
如何启动 Jupyter ?
先在电脑上启动 Jupyter 再点「连接」: jupyter lab --no-browser 启动后终端会打印一个 带 token 的网址,把其中的地址粘贴到上方输入框、token 填入 token 栏即可(默认 http://127.0.0.1:8888)。

💡 免 token 启动可加参数:--ServerApp.token=''
💡 若本页以 https 打开而 Jupyter 是局域网 http://IP,浏览器可能拦截混合内容;请使用 http://127.0.0.1 或 http://localhost(被浏览器视为安全来源)。
💡 Windows 上请通过 WSL2 / Docker / Drake 官方容器镜像 运行 Drake(官方暂不支持 Windows 原生)。
🚨 若内嵌区白屏:Jupyter 默认禁止被 iframe 引用(CSP: frame-ancestors 'self')。需在该 Jupyter 的 jupyter_server_config.py 里放行来源后重启: c.ServerApp.tornado_settings = {"headers": {"Content-Security-Policy": "frame-ancestors 'self' http://127.0.0.1:* http://localhost:* https://lateai.com"}}
Jupyter 运行区 ○ 未连接
🐍

把 Jupyter 内嵌到右侧,边改边跑

在顶部填好服务器地址与 token(默认 http://127.0.0.1:8888),点「连接」即可在此运行。左侧示例可任意编辑:改好 Python 后 复制 到 Notebook 的新 cell 运行;改过 URDF 就点「URDF 并入 Python」保持程序与模型同步。
💡 更省事:左侧底部 「🚀 一键导入 Jupyter」 —— 自动把「当前 Python + URDF 页改动」合成一个新 Notebook 写入并打开,回车即可运行。

💡 还没装 Jupyter?
本页内嵌的是你自己的本地 Jupyter 服务器。
① 先按 Drake 官方方式在 Ubuntu / macOS / WSL2 装好 pydrake(Windows 请用 WSL2 或 Docker 官方镜像);
② 再装并启动 Jupyter:pip install jupyterlab jupyter lab --no-browser --ServerApp.token=''
③ 回到本页点「连接」即可看到 JupyterLab,再把示例代码粘贴进 Notebook 运行。
已复制