liruiw/OMG-Planner

blenderpy issue in process_shape for shapenet objects

Closed this issue · 1 comments

Hi, I'm curious how important the blender processing step here is?

The code only seems to apply for filepaths with "kitchen" in it, yet when I look at the URDFs in this dataset they all point to a model_normalized.simplified.obj which is produced by the blender processing, as far as I can tell.

I tried disabling the kitchen check and running the blender processing on shapes from shapenet but get the following error:

Clearing split normals and removing doubles.
Info: Removed 0 vertice(s)
Info: Removed 0 vertice(s)
Unchecking auto_smooth
Adding edge split modifier.
Applying smooth shading.
Running smart UV project.
Traceback (most recent call last):
  File "/iris/u/ayz/anaconda3/envs/gaddpg_py37/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/iris/u/ayz/anaconda3/envs/gaddpg_py37/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/iris/u/ayz/GA-DDPG/OMG/real_world/process_shape.py", line 161, in <module>
    blender_process.process_obj(fpath)
  File "/iris/u/ayz/GA-DDPG/OMG/real_world/blender_process.py", line 22, in process_obj
    path = os.path.join(file_path, "model_normalized.obj")
  File "/iris/u/ayz/anaconda3/envs/gaddpg_py37/lib/python3.7/site-packages/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.uv.smart_project.poll() failed, context is incorrect

Any idea what might be up here?

Right the blenderpy should be applied to all objects so that we can attach textures to the objects. I haven't seen that specific errors before, but i guess it might be related to blender version etc.