dfki-ric / phobos

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exporting URDF with 0 mass causes divide-by-zero error

kevinfoley opened this issue · comments

Summary: If we try to export a URDF for a robot which has 0 mass for the base, the export fails with an error.

  1. Create a robot with Phobos (or, use the attached example Blend file and skip to step 3)
  2. When creating inertials for the base of the robot, set the mass to 0 (note: you must manually type 0 into the field. the default value is 0.001 which may be truncated to 0.0 in the UI but is a non-zero value).
  3. Export the robot as a URDF.

Expected result: URDF export succeeds
Actual result: When we try to export the URDF, Phobos throws a divide-by-zero error and the export operation fails.

Additional notes: PyBullet treats an object with 0 mass as having infinite mass, which keeps it from moving around. For robots that should have a stationary base, it's very helpful to have the mass of the base set to 0. Currently, we have to manually edit the URDF file after exporting from Phobos.

Environment:

  • Windows 10 Pro 64-bit
  • Blender 3.3.15 (LTS)
  • Phobos 2.0.0

@kevinfoley Thank you for reporting this. Please take a look at my commit.

@AlpenAalAlex Your fix appears to work. Thanks!