Blenderproc: Problems with physics_positioning example

Created on 5 Feb 2021  路  2Comments  路  Source: DLR-RM/BlenderProc

Hi,
when I run the physics_positioning example:

python3 run.py examples/physics_positioning/config.yaml examples/physics_positioning/active.obj examples/physics_positioning/passive.obj examples/physics_positioning/output

and then the Hdf5 visualization script:

python3 scripts/visHdf5Files.py examples/physics_positioning/output/0.hdf5

this is the resulting image:

image

I have tried to increase the simulation time, but the spheres just never fall.
The console output first reads the following error:

Error! Unsupported graphics card or driver.
A graphics card and driver with support for OpenGL 3.3 or higher is required.

but then starts running all the modules normally, bakes the simulation and saves the Hdf5 file in the output folder.

I am using Blender 2.91.0 on Ubuntu 20.04 on WSL 2, which only supports OpenGL 1.4. But I thought this would not be a problem because I normally do not need to use the GUI.
Does the physics simulation need to use a higher version of OpenGL? All the other examples that I have tried give me the expected output.
What else might be wrong?

Most helpful comment

Hey @atirehgram,

apparently this example is not fully up-to-date. A while ago the default collision shape has changed to CONVEX_HULL, which here causes the balls to not fall into the valleys.

To change the collision shape you just need to adapt the configuration of the PhysicsPositioning module:

{
      "module": "object.PhysicsPositioning",
      "config": {
        "min_simulation_time": 4,
        "max_simulation_time": 20,
        "check_object_interval": 1,
        "collision_shape": "MESH" # <-- here
      }
},

Keep in mind that using the mesh collision shape in more complex examples can cause performance and glitch issues

All 2 comments

Hey @atirehgram,

apparently this example is not fully up-to-date. A while ago the default collision shape has changed to CONVEX_HULL, which here causes the balls to not fall into the valleys.

To change the collision shape you just need to adapt the configuration of the PhysicsPositioning module:

{
      "module": "object.PhysicsPositioning",
      "config": {
        "min_simulation_time": 4,
        "max_simulation_time": 20,
        "check_object_interval": 1,
        "collision_shape": "MESH" # <-- here
      }
},

Keep in mind that using the mesh collision shape in more complex examples can cause performance and glitch issues

This solved the problem. Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xiaflowers picture Xiaflowers  路  3Comments

hummat picture hummat  路  5Comments

matemato picture matemato  路  4Comments

manuelli picture manuelli  路  3Comments

soans1994 picture soans1994  路  5Comments