BSD 3-Clause "New" or "Revised" License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

项目背景与痛点

在机器人设计与开发的过程中,有效的模型创建工具是至关重要的一环。URDF(Unified Robot Description Format)、SDF(Simulation Description Format)和SMURF(Stereoscopic Morphing URDF Format)是三种常用的机器人模型描述格式。然而,现有的建模工具普遍缺乏直观的设计和简易的操作,难以实现高效的物理建模。在这种背景下,来自德国人工智能研究中心(DFKI)的 Phobos 插件应运而生,它服务于 Blender 这个强大的三维设计软件,为用户提供了一种所见即所得(WYSIWYG)的机器人模型创建体验。

Phobos 解决的核心痛点在于简化了复杂机器人模型的建模过程,使得开发者能够以更为直观和高效的方式快速构建出符合需求的机器人模型。在各类机器人开发项目中,这无疑可以显著提高设计阶段的生产力,减少因繁琐手工建模带来的开销和错误。

技术核心揭秘

Phobos 的设计思想在于充分利用 Blender 强大的三维建模功能的基础上,通过插件形式提供特定于机器人模型的工具和功能。在底层实现上,它需要高效地与 Blender 的用户界面进行深度集成,并进行特性扩展,同时支持所需的模型描述格式。以下是其内部数据流和架构设计的一个示意。

graph TD A[用户界面触发] --> B[模型选择] B --> C{"模型配置?"} C -->|"需要"| D[配置调整] C -->|"不需要"| E[格式选择] E --> F{"导入/导出?"} F -->|"导入"| G[资产导入] F -->|"导出"| H[导出为格式] H --> I[数据验证] I --> J[模型文件生成] D --> C

首先,用户界面触发模型选择操作后,将进入模型配置检查环节。若需要,Phobos 会引导用户进行相应的模型配置调整。之后,用户将被询问是否需要进行格式选择。根据需求,用户可以决定是导入现有模型,还是导出当前编辑的模型为指定格式。不论是导入还是导出,整个流程都将经过数据验证以确保模型描述文件的正确性,最终到达模型文件生成。

功能亮点与差异

相比其他专注于机器人设计的工具,Phobos 的一大优势在于其操作简便且支持多种常见的机器人描述格式。不仅如此,Phobos 的实现允许用户直观地操作和调整模型,这种设计理念极大地提高了模型创建和修改的效率。更具特色的是,它能够无缝集成到 Blender,充分利用 Blender 的高级三维建模功能,实现从设计到最终文件导出的一体化流程处理。

应用场景与落地建议

Phobos 在各类研究或工业领域中的机器人设计与开发场景中表现出色。例如,用于模拟与实际控制的机器人模型创建、教育研究中的机器人设计教学,以及工业自动化场景中的机器人装配部件设计等。由于 Phobos 运行在 Blender 环境内,为了确保最佳性能,建议用户在硬件条件较好的环境下使用,同时保持 Blender 的版本是最新的。

综合评价

Phobos 插件凭借丰富的功能性和高集成性,为机器人模型的设计带来极大的便利。然而,其应用场景当前仍局限于特定的开发者与研究人员群体。对于普通用户而言,使用 Blender 可能会带来一定的学习成本。综合来看,Phobos 是一款非常实用且高效的工具,能够显著提升机器人设计开发阶段的效率,值得目标用户群体进一步探索和采用。

关于

GitHub 原始描述(英文)

An add-on for Blender allowing to create URDF, SDF and SMURF robot models in a WYSIWYG environment.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1193
价值分
586
活跃状态
活跃

语言占比

Makefile
Python
Shell
TeX

README

latest-release DOI license made-with-sphinx-doc API-Docs

Phobos

Phobos is both a CLI tool and add-on for the open-source 3D modeling software Blender v3.3LTS to support your robot model creation and editing.

The Blender add-on enables the creation of WYSIWYG robot models for use in robot frameworks like ROS and ROCK or in real-time simulations such as MARS or Gazebo. Phobos exports formats such as URDF, SDF or SMURF and common mesh formats (Stereolithography (.stl), Wavefront (.obj) or Collada (.dae)).

Phobos was initiated and is currently developed at the Robotics Innovation Center of the German Research Center for Artificial Intelligence (DFKI) in Bremen, together with the Robotics Group of the University of Bremen.

Please contact Malte Langosz for any inquiries, or any questions and feedback not suited for the issues page.

Version 2.1.0

Version 2.1.0 refactors especially the phobos-ci usage and improves the configurability by config inheritance. However these are breaking changes to the pipeline configuration. See PR #364 for more details on the changes.

Version 2.0.0

With version 2.0.0 we did a refactoring of Phobos and its now possible to use phobos as a normal python package and command line tool (see below).

When running the new Phobos on a model created with an older version of Phobos, make sure to have a backup. For most cases you should be able to update your model by simply exporting it to smurf and then importing it again from that smurf file. Due to the changes between Blender 2 to 3 it might be necessary to check whether your materials already use the Specular BSDF or Principled BSDF shaders, if not you’d have to update this manually.

If you encounter any problems with this new version please do not hesitate to open an issue here.

Questions or Ideas you want to discuss?

Please have a look at our GitHub discussions.

Found a bug or want to request a feature?

Please let us know by opening an issue here.

Documentation

Citing

Phobos has been published in the Journal of Open Source Software. We ask users to cite the use of Phobos, as it allows us to keep the project alive.

When citing, please provide this information:

  • Phobos version you were using (see the wiki for information about versions)
  • If you were using additional Phobos plugins or configurations.
  • The general Phobos paper.

If you are on the hunt for a BiBTeX entry, check out the FAQ section.

Installation

Blender

UPDATING: If you already have phobos installed and want to update. You have to remove the old version of Phobos first and close Blender. Then proceed with the installation steps explained below.

NOTE (WINDOWS): If you are using blender under Windows, make sure you have the latest version of Microsoft Visual C++ Redistributable installed. Otherwise Blender’s python won’t work properly.

To install Phobos in blender download the phobos.zip of the release or zip the phobos subdirectory (e.g. zip -r phobos.zip phobos) Phobos has several python dependencies, those have to be installed in blender before you can use phobos. There are two ways of installing Phobos:

  • Recommended:
    1. Directly install the phobos.zip in blender: Blender->Edit->Preferences->Addons->Install and activate it.
    2. Restart Blender.
    3. Activate Phobos Add-on again.
  • (Offers inspection of the requirements before installing them) Before installing the phobos.zip you can run the script install_requirements.py with blender’s python.
    1. ${BLENDER_EXECUTABLE} -b --python install_requirements.py
      
    2. Install the phobos.zip in blender: Blender->Edit->Preferences->Addons->Install and activate it.

After installation the phobos main menu can be found on the right hand side of the 3D Viewport. If not already visible, one can find a very small arrow to open the Blender toolbar (purple circle showing it in the image).

Small arrow to open the phobos toolbar widget.

Phobos is currently tested and running with Blender v3.3 LTS.

CLI

Install the requirements by executing install_requirements.py with the python you want to install phobos to:

cd phobos
python3 install_requirements.py

Then just install it using pip:

cd phobos
pip install .

or with autoproj:

  1. Add the package to your buildconf/package_set
  2. Install via amake

Overview

Blender

Model of the SpaceClimber robot in Blender, next to the Phobos toolbar
displayed on the
left.

Model of the SpaceClimber robot in Blender, next to the Phobos toolbar displayed on the left.

Phobos makes use of Blender’s hierarchical object graph and its bone objects. These objects, normally used for animating 3D characters, allow to store 3D coordinate systems and apply constraints to their movements, for instance to restrict the movement of an object to a certain range on a specific axis. This allows to replicate the links and joints defined in a URDF model and together with the hierarchical tree of parent and child objects, the complete, branching kinematic chain of a robot can be represented. By attaching meshes or primitives to the bones, Phobos allows to add visual and collision objects to a model. Additional objects allow storing further information, e.g. centers of mass of each part of a robot, thus refining the physical representation. Sensor objects can be added to correctly place and orient devices such as laser scanners, cameras or contact sensors. Making use of Blender’s custom object properties, any necessary information can be added to the model, from inertia tensors to opening angles of cameras.

Decomposition of the different elements from which Phobos models are composed
in Blender.

Decomposition of the different elements from which Phobos models are composed in Blender. These elements can be arranged in Blender on different layers, thus avoiding confusion or obstruction of view when editing very complex models.

CLI

You can either use CLI-phobos as a normal python package or use the scripts provided with it.

For the latter do phobos --help to get a list of the currently available scripts. It will also tell you which dependencies are missing for some scripts.

Features

  • WYSIWYG editor for robot models using Blender
  • CLI tools for fast and easy model handling and inspection
  • CI tool to run phobos headless in your CI-pipeline for atomated model processing and maintenance
  • Import and export of URDF, SDF SMURF and other formats
  • Easy definition of robot kinematics (links and joints)
  • Visualisation of different model components, even joint constraints
  • Numerous tools for fast editing:
    • Batch editing of object properties
    • Auto-generation of collision objects
    • Auto-generation of inertia tensors from mass and shape
    • Calculation of merged inertia for complex links
    • Verbose logging
  • Saving and loading of model poses
  • Annotation of objects from motors/sensors to joints/links
  • Save/load different export configurations for the same model
  • Export with defined floating point precision
  • Model integrity checks
  • Tools for maintaining your own model database
  • Library containing Python examples for automatic model adaption
  • All the cool features Blender already provides (rendering, animation, etc.)

License

Phobos is distributed under the 3-Clause BSD License.

评论

暂无评论