google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 400 forks source link

Cannot create AugmentedImageDatabase if the Unity project has a space in the name #297

Closed joshliebe closed 5 years ago

joshliebe commented 6 years ago

This happened to me in the middle of a demo unfortunately (The demo gods are never kind). I called the Unity project "GDG Demo" and after selecting the images -> Create -> GoogleARCore -> AugmentedImageDatabase, it couldn't create the database. The Quality for each image gets stuck at "Calculating...":

screen shot 2018-07-06 at 09 44 18

Here is the error from the log: chmod: /Users/joshualeibstein/Documents/Unity/GDG: No such file or directory chmod: Demo/Assets/GoogleARCore/CLI/augmented_image_cli_osx: No such file or directory

pablisho commented 6 years ago

Hi, thanks for the report. I added it to our internal tracker.

fredsa commented 6 years ago

As a workaround (thanks, @pablisho), for those have that would like to work with folder structures that contains spaces or other problematic characters, modify AugmentedImageDatabaseInspector.cs to wrap double quotes around the {0} image path argument, like so:

ShellHelper.RunCommand(cliBinaryPath,
  string.Format("eval-img --input_image_path \"{0}\"", imagePath), out quality, out error);
pablisho commented 6 years ago

Hi, ARCore SDK for Unity 1.5.0 has been released and this issue should be fixed. Please feel free to comment if you still experience it.

fredsa commented 6 years ago

Another change is required: AugmentedImageDatabase.cs should be modified to quote cliBinaryPath argument.

After importing ARCore SDK for Unity 1.5.0, modify this line in AugmentedImageDatabase.cs: ShellHelper.RunCommand("chmod", "+x " + cliBinaryPath, out output, out error); to: ShellHelper.RunCommand("chmod", "+x \"" + cliBinaryPath + "\"", out output, out error);

This fix will be included in an upcoming release.

seelang2 commented 5 years ago

I experienced the same issue while following joshliebe's presentation code using SDK v 1.6.0. I did note that there is a space in one of my folder names the project sits in. Using Unity 2018.3 on Mac OS. Removing spaces from the file path did resolve the issue.

fredsa commented 5 years ago

Fixed in ARCore for Unity SDK 1.6.0

gxgpau commented 5 years ago

This issue still happens in SDK 1.6.0 This long time on "Calculating..." could be related to the images size?

jean-barre commented 5 years ago

I do confirm the issue occurs with my configuration:

I am not able to open the "Example Database" while pictures have a minimum score of 85. I am not able to run the arcoreimg tool on OS X 10.9.5 but it works on OS X 10.13.6. I am not able to import in Unity an image database created from another machine.

CyanDeveloper commented 5 years ago

Still happens in SDK 1.10.0 and Unity 2019.1.2f1

fredsa commented 5 years ago

Can you try right-clicking on one or more of the sample images in the SDK (see screenshot), then selecting Create > Google ARCore > AugmentedImageDatabase?

Screen Shot 2019-06-28 at 11 04 50 AM

I was able to create an Augmented Image Database using the ARCore SDK for Unity 1.10.0 (tried both Unity 2017.4.27f1 and 2019.1.4f1) on macOS 10.14.5 in a project folder named space is awesome.

For troubleshooting, can you try the following:

  1. Close Unity (to avoid locking any files)
  2. Remove Assets/GoogleARCore
  3. Relaunch Unity and open project; ignore compile errors due to missing SDK files
  4. Reimport arcore-unity-sdk-v1.10.0.unitypackage into your project
  5. Try creating an Augmented Image Database
CyanDeveloper commented 5 years ago

No changes... still remain in "Calculating..." status. Any other idea?

runaverse commented 5 years ago

same error for me as well. also on a mac

ade-adisa commented 5 years ago

Same error here too, using Unity 2019.2.6 on a Mac

tank-t-bird commented 4 years ago

The only fix was to rename the folder in order to get my project to work again. Having the same issue using 2018.3.14f1 running on MacOS 10.14.6. Does not work with included sample images either. I tried the suggested troubleshooting and that didn't work. I also made a new project, imported the SDK, opened the Augmented Image sample scene and the default database is still stuck on calculating. Happens in ArCore SDK for Unity 1.13 and 1.12.

anandragav commented 4 years ago

I have the same issue and I am using Unity 2019.3.2f1. I imported custom package arcore-unity-sdk-1.15.0.unitypackage and my image database is stuck calculating...