Robot Model Preview · 机器人模型预览
Preview URDF, SDF, and standalone meshes in 3D next to your code in VS Code. Inspect robot links, move joints, and check geometry as you edit.
Quick start
- Open a model file or select it in the Explorer.
- Run Robot Model Preview: Open Preview from the Command Palette or the file’s context menu.
- Drag with the left mouse button to orbit, drag with the right button to pan, and scroll to zoom. Double-click a link to focus it and reveal its joint controls.
The preview is read-only and refreshes when you save the model. Rendering runs on demand.
| Type |
Formats |
| Robot models |
.urdf |
| Simulation models and worlds |
.sdf, .world, .model |
| Meshes |
.stl, .dae, .obj, .gltf, .glb, .ply, .fbx, .3ds, .mesh |
For package:// and model:// references, use Robot Model Preview settings (urdfView.searchPaths) to add asset search folders. The extension asks before downloading detected HTTP(S) assets and caches approved downloads locally. Missing assets appear as placeholders. Use Robot Model Preview: Show Output for details.
Preview covers geometry and joints. For Xacro files, preview the generated URDF. Physics, sensors, and plugins require a simulator.
中文快速上手
- 打开模型文件,或在 VS Code 资源管理器中选中文件。
- 从命令面板或文件右键菜单运行 机器人模型预览:打开预览。
- 左键拖动旋转,右键拖动平移,滚轮缩放。双击连杆即可聚焦并显示关节控制柄。
支持 URDF、SDF 模型与场景,以及上表列出的独立网格。预览为只读,保存模型后会刷新,画面按需渲染。
如果模型使用 package:// 或 model:// 引用,可在扩展设置中通过 urdfView.searchPaths 添加资产搜索目录。检测到 HTTP(S) 资产时,扩展会先请求确认,再下载并在本地缓存。缺失项会显示为占位,可用 机器人模型预览:显示输出 查看详情。
预览用于查看几何和关节。Xacro 请先展开为 URDF。物理、传感器和插件需要模拟器运行。