Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding custom assets/glb to thor conversion #64

Open
LukasH77 opened this issue Nov 5, 2024 · 0 comments
Open

adding custom assets/glb to thor conversion #64

LukasH77 opened this issue Nov 5, 2024 · 0 comments

Comments

@LukasH77
Copy link

LukasH77 commented Nov 5, 2024

in the objathor readme it is said to use the following for converting a .glb asset to your thor format but there seems to be no pipeline_to_thor in the repo?

python 
-m objathor.asset_conversion.pipeline_to_thor 
--uids=000074a334c541878360457c672b6c2e 
--output_dir=<some_absolute_path>
--extension=.msgpack.gz
 --annotations=<annotations_file_path> 
--live 
--blender_as_module

I have adapted the objathor.asset_conversion.object_consolidater file to put out the pkl.gz format and added my asset to the 2023_09_23/assets folder as well as an entry to the annotations but when running holodeck I get the following error when generating the top_down_frame, so it seems I did not add it correctly - do you have any ideas how to fix this?

File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/controller.py", line 618, in __init__
    event = self.reset(scene)
            ^^^^^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/controller.py", line 777, in reset
    self.last_event = self.step(action="CreateHouse", house=scene)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/controller.py", line 1066, in step
    self.run_action_hook(action)
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/controller.py", line 997, in run_action_hook
    event = method(action, self)
            ^^^^^^^^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/hooks/procedural_asset_hook.py", line 106, in CreateHouse
    return create_assets_if_not_exist(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/hooks/procedural_asset_hook.py", line 57, in create_assets_if_not_exist
    evt = create_asset(
          ^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/util/runtime_assets.py", line 327, in create_asset
    evt = thor_controller.step(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukas/miniconda3/envs/external_holodeck/lib/python3.11/site-packages/ai2thor/controller.py", line 1106, in step
    raise RuntimeError(
RuntimeError: DirectoryNotFoundException: Could not find a part of the path "/home/lukas/.ai2thor/releases/thor-CloudRendering-3213d486cd09bcbafce33561997355983bdf8d1a/processed_models/mesh/albedo.png".. trace:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at Thor.Procedural.ProceduralTools.CreateAsset (UnityEngine.Vector3[] vertices, UnityEngine.Vector3[] normals, System.String name, System.Int32[] triangles, UnityEngine.Vector2[] uvs, System.String albedoTexturePath, System.String normalTexturePath, System.String emissionTexturePath, Thor.Procedural.Data.SerializableCollider[] colliders, Thor.Procedural.Data.PhysicalProperties physicalProperties, UnityEngine.Vector3[] visibilityPoints, Thor.Procedural.Data.ObjectAnnotations annotations, System.Boolean receptacleCandidate, System.Single yRotOffset, System.Boolean serializable, System.Boolean returnObject, UnityEngine.Transform parent, System.Boolean addAnotationComponent, System.String parentTexturesDir) [0x0035c] in <59daa9d85f214c32868d5228dfaf9b98>:0 
  at UnityStandardAssets.Characters.FirstPerson.BaseFPSAgentController.CreateRuntimeAsset (Thor.Procedural.Data.ProceduralAsset asset) [0x00000] in <59daa9d85f214c32868d5228dfaf9b98>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <695d1cc93cca45069c528c15c9fdd749>:0
@LukasH77 LukasH77 changed the title glb to thor conversion adding custom assets/glb to thor conversion Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant