Git Product home page Git Product logo

arunityx's Introduction

Read me for artoolkitX

Build state

macos iOS Android Linux Windows
Build Status Build Status Build Status Build Status Build status

What is artoolkitX?

artoolkitX version 1.0 is a software development kit (SDK) consisting of libraries and utilities that help developers implement the foundation of great augmented and mixed reality applications. The SDK includes some examples of applications that demonstrate the capabilities of artoolkitX. artoolkitX supports a wide-variety of platforms, including iOS and Android, and macOS, Windows, and Linux.

artoolkitX is free to use! The SDK is licensed under the GNU Lesser General Public License version 3.0, allowing for linking into both closed- and open-source software. Please read the file license to understand your rights and obligations when using artoolkitX.

Complete source is provided, and we encourage users to favourite the project on GitHub at https://github.com/artoolkitx/artoolkitx and log issues and read the documentation provided there, and to join the artoolkitX community via our homepage at http://www.artoolkitx.org.

artoolkitX's development is currently generously sponsored by Ethar, Inc. https://ethar.com. The open source project is administered by long-term developers of ARToolKit and from and the open-source community.

For experienced developers wanting to quickly make use of the SDK, please read the file Quick start. To read about the changes in this release, please read the file Release notes.

Join the artoolkitX community:

arunityx's People

Contributors

jeffbail avatar optrixau avatar philip-lamb avatar sokki avatar thorstenbux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arunityx's Issues

Please add support for "WebCamTexture" in unity

Please support "WebCamTexture" in unity. This allows more platforms to be supported. I've been looking into using ARtoolkitx to bring AR effects to more platforms. However, some platforms support a native API to capture the camera footage. While it's great to support Windows, Android, iOS in the ARtoolkitx source code, there are some platforms that don't support it. Use unity's 'WebCamTexture' to support many more platforms from the unity native code level.
Please add this feature. Thanks!

Re-implement native texture support for BGRA textures on Windows, Linux.

While it's ALWAYS crashed the iOS version, I've found that Native GL Texturing is causing crashes in the Android build now.

I've noticed that performance seems quite a bit better without the option anyway, so Native Texturing seems a little less necessary right now. Still, since it's an available option, I thought it'd be best to check.

A problem occurred configuring project ':arunityXPlayer'.

When I try to build arunityX in my Windows 7 with Git Bash for android I get the following error message:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':arunityXPlayer'.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

How can I fix that?

DllNotFoundException: ARX

  1. I checked-out : https://github.com/artoolkitx/arunityx

  2. I checked-out : https://github.com/artoolkitx/artoolkitx and put them to D:\Projects\ARToolkit\arunityx\Source\Extras\artoolkitx

  3. I went to : D:\Projects\ARToolkit\arunityx\Source and opened GIT BASH, and executed command
    .\build.sh windows --dev

  4. I got error
    "+ cp -rf /d/Projects/ARToolkit/arunityx/Source/Extras/artoolkitx/SDK/bin/ARX.dll /d/Projects/ARToolkit/arunityx/Source/../Source/Package/Assets/Plugins/x86_64/
    cp: cannot create regular file '/d/Projects/ARToolkit/arunityx/Source/../Source/Package/Assets/Plugins/x86_64/': Not a directory"

So I manually copied ARX.dll from D:\Projects\ARToolkit\arunityx\Source\Extras\artoolkitx\SDK\bin\ to D:\Projects\ARToolkit\arunityx\Source\Package\Assets\Plugins\x86_64

  1. I opened an example scene, BarcodeScene.unity

  2. Upon loading, I received three of this error on my Console :
    DllNotFoundException: ARX
    PluginFunctionsARX.arwRegisterLogCallback (.PluginFunctionsLogCallback lcb) (at Assets/artoolkitX-Unity/Scripts/PluginFunctionsARX.cs:89)

I see that the ARX.dll is already in Assets/Plugins/x86_64 in my unity Project tab.

BTW, sometimes I also got error :
FileNotFoundException: D:/Projects/ARToolkit/arunityX Samples/barcode/arxExampl_Data/Plugins/ARvideo.dll does not exist

I see that the ARVideo.dll was not built, but ARVideo.lib was built.

Thanks.

Windows plugin needs opencv DLLs.

@ThorstenBux - Trying to upgrade an existing v5 project to X, and I've run into this issue.

Currently building for Windows.

I initially simply copied the files from the source version over my existing version (after ensuring I grabbed the Windows and Android binaries).

When that had the DLLNotFound exception, I then downloaded the latest release UnityPackage and installed it into my project. I did NOT include the items trying to install to C:\ drive, or the stuff from the Packaging system.

Still didn't work.

When I use Dependency Walker, it's indicating that it's looking for the OpenCV DLL files and not finding them (this can often trigger a "The Specified Module Could Not Be Found" error in Windows.) Did the Windows DLL somehow get compiled with dynamic linking against OpenCV instead of static linking?

Unable to start ARUnityX on Android due to an InvalidOperation error

With an app with the correct permissions configured, the following error occurs on Android when starting the app

2023/05/10 16:20:10.478 15270 15289 Info Unity ARController: ARController.Awake())
2023/05/10 16:20:10.481 15270 15289 Info Unity ARController: ARController.OnEnable()
2023/05/10 16:20:10.499 15270 15289 Info Unity ARController: artoolkitX version 1.1.7 initialised.
2023/05/10 16:20:10.506 15270 15289 Info Unity ARController: ARController.Start(): Application.isPlaying = True autoStart: True
2023/05/10 16:20:10.509 15270 15289 Info Unity ARController: Starting AR.
2023/05/10 16:20:10.546 15270 15289 Info Unity ARController: Render device: Vulkan 1.1.0 [0x00800000], using Unity texturing.
2023/05/10 16:20:10.554 15270 15289 Info Unity ARController: Starting artoolkitX video with vconf '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 16:20:10.600 15270 15289 Info Unity ARController: Setting artoolkitX tracking settings.
2023/05/10 16:20:10.643 15270 15289 Error Unity InvalidOperationException: Handle is not initialized.
2023/05/10 16:20:10.643 15270 15289 Error Unity   at System.Runtime.InteropServices.GCHandle.Free () [0x00034] in <b0b74789f1894dcc9a389d6f5a51da7d>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at PluginFunctionsARX.arwSetSquareMatrixModeAutocreateNewTrackables (System.Boolean on, System.Single defaultWidth, PluginFunctionsTrackableEventCallback tecb) [0x0002f] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.set_SquareMatrixModeAutocreateNewTrackables (System.Boolean value) [0x00015] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.StartAR () [0x00474] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.Start () [0x0003c] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity 
2023/05/10 16:20:10.646 15270 15289 Info Unity AROrigin: Found 2 trackables eligible to become base trackable.

Animation OnMarkerLost

Hello, I'm trying to add animations to the AR content whenever the tracker is lost. I managed to make the events OnMarkerFound and OnMarkerLost work. I even managed to make the animation work for OnMarkerFound, but it seems OnMarkerLost freezes the content.

Is there any way to make an animation of the AR content trigger when the marker is lost? I have tried with both ARToolKit5 and ARToolKitX.

Windows+Unity: AR_PIXEL_FORMAT_420f --> source->bufPlanes empty --> Access Violation

After I finally managed to compile the ARX.dll for Windows using mingw/cmake/Visual Studio 2019 and imported it alongside other libraries into Unity (see image) I always ended up crashing the editor as soon as I hit play.
image
After some digging in the code and in the Unity logs I found the problem in the file videoRGBA.c:

int videoRGBA::videoRGBA(uint32_t *destRGBA, AR2VideoBufferT *source, int width, int height, AR_PIXEL_FORMAT pixelFormat)

In case AR_PIXEL_FORMAT_420f bufPlanes has no valid index 0 and the access causes the access violation:
image

I also found out that in video2.c it uses ARVIDEO_INPUT_WINDOWS_MEDIA_FOUNDATION if that helps.

I have been trying to fix it myself but I am not very familiar with the code and haven't managed to get a working build with correct image output. All I managed to get was a green screen. So any help is appreciated!

Android Issues - Cache Dir Access for Runtime-Created Markers

When running on Android, the Load() function kicks off a call to unpackStreamingAssetToCacheDir()

This appears to work correctly when the markers are pre-configured (ie. you create the ARTrackable in the scene and build it in).

However, if your markers are created at runtime, you get an UnauthorizedAccessException each time Load is called for a runtime marker when attempting to access the cache directory in Unity 2018.4 (the long-term-support version).

You get the following log message in logcat: Access to the path '/storage/emulated/0/Android/data/application id/cache' is denied.

Is ARToolkitX somehow locking the cache folder? I've noticed that the cache folder is passed to ARToolkitX as a parameter to the video in Android versions. Perhaps we instead need to create a subfolder for the video cache?

Cannot set frame resolution through Unity inspector

Hello,

I'm targeting Android.
I try to set my frame resolution through the Unity inspector but I get a message saying that my width and height parameters will be ignored and instead artoolkitx opens the frame using a lower resolution.

Here's the log:

12-18 23:10:26.743 9928 9957 I libAR : [info] Starting...
12-18 23:10:26.744 9928 9957 I libAR : [info] Setting video configuration '-width=1920 -height=1080 -cachedir="/storage/emulated/0/Android/data/org.artoolkitx.arx.example/cache"'.
12-18 23:10:26.744 9928 9957 I libAR : [info] Opening artoolkitX video using configuration '-width=1920 -height=1080 -cachedir="/storage/emulated/0/Android/data/org.artoolkitx.arx.example/cache"'.
12-18 23:10:26.744 9928 9957 I libAR : [info] Using supplied video config "-width=1920 -height=1080 -cachedir="/storage/emulated/0/Android/data/org.artoolkitx.arx.example/cache"".
12-18 23:10:26.744 9928 9957 W libAR : [warning] Warning: videoAndroid cannot change frame size from native code. Configuration option '-width=' will be ignored.
12-18 23:10:26.744 9928 9957 W libAR : [warning] Warning: videoAndroid cannot change frame size from native code. Configuration option '-height=' will be ignored.

12-18 23:10:26.797 9928 9957 I libAR : [info] Waiting for video source.
12-18 23:10:26.799 9928 9957 I libAR : [info] Waiting for video.
12-18 23:10:26.932 9928 10078 I libAR : [info] Opened artoolkitX video 640x480@1Bpp (AR_PIXEL_FORMAT_NV21).
12-18 23:10:26.933 9928 10078 I libAR : [info] Fetching external camera parameters.
12-18 23:10:26.933 9928 10077 I libAR : [info] cparamSearch beginning search for asus/ASUS_Z01KD/sdm660, camera 0, aspect ratio 4:3.
12-18 23:10:26.994 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.062 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.128 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.229 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.329 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.431 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.531 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.651 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.739 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.843 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:27.955 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:28.016 9928 10077 W libAR : [warning] Using default camera parameters for 640x480 image size, 45 degrees vertical field-of-view.
12-18 23:10:28.038 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:28.146 9928 9957 E libAR : [error] ARController::androidVideoPush2: ARVideoSource is not running.
12-18 23:10:28.181 9928 9957 I libAR : [info] Video source is running. (Waited 78 calls.)

Any help would be greatly appreciated.

Thanks!

Enable Image Tracker creation at runtime

While pre-processing image trackers is useful, it would also be beneficial to create image tracker references at runtime dynamically.

This would allow the following use cases:

  • Downloading a tracked image and registering with the image tracker
  • Capturing of new tracked images using the camera for identifying the placement of new content

Black Screen with ARToolkitX on Android and Unity

Hello everyone,

I try to use ARToolkitX on Unity with ARUnityX.
I have Unity 2017.4.15f1 on Windows 10.

I downloaded the last version of ARUnityX (this git) and folowed the instructions to build it for windows and android.
I ended copying some files from the Source folder to my Unity project. Here are the files I copied :

  • Folder "artoolkitX-Unity"
  • Folder "StreamingAssets"
  • In Plugins :

filesx

When I open SimpleScene and run it in Windows, it works fine.
When I run it on ANdroid, the screen stays black, and in Android monitor, I can see :

"Ok - True .... Got Frame - False"
It looks like writing it each frame, it makes me think the program tries to access camera but fails.

Here is my manifest (I changed the package name to "com.artoolkitx.testUnity" in Unity) :

manifest

Any ideas ?

Thank you

Can't package on Linux

I've downloaded and run the setup.sh linux which seems to be successful.
Log:

brian@me:~/Documents/Programming/arunityx/Source$ ./build.sh linux
+ test 1 -gt 0
+ case "$1" in
+ BUILD_LINUX=1
+ shift
+ test 0 -gt 0
++ uname -s
+ OS=Linux
++ uname -m
+ ARCH=x86_64
+ TAR=/usr/bin/tar
+ '[' Linux = Linux ']'
++ /usr/bin/nproc
+ CPUS=8
+ TAR=/bin/tar
+ source /etc/os-release
++ NAME=Ubuntu
++ VERSION='18.04.3 LTS (Bionic Beaver)'
++ ID=ubuntu
++ ID_LIKE=debian
++ PRETTY_NAME='Ubuntu 18.04.3 LTS'
++ VERSION_ID=18.04
++ HOME_URL=https://www.ubuntu.com/
++ SUPPORT_URL=https://help.ubuntu.com/
++ BUG_REPORT_URL=https://bugs.launchpad.net/ubuntu/
++ PRIVACY_POLICY_URL=https://www.ubuntu.com/legal/terms-and-policies/privacy-policy
++ VERSION_CODENAME=bionic
++ UBUNTU_CODENAME=bionic
+ grep -qE '(Microsoft|WSL)' /proc/version
+ '[' ']'
+ echo 'start download of libs'
start download of libs
+ '[' ']'
+ '[' ']'
+ '[' ']'
+ '[' ']'

however when I then try to run the packaging it tells me that I need to run the build.sh ...

brian@me:~/Documents/Programming/arunityx/Source$ ./packaging/package.sh 
+ UNITY_VERSION=
+++ dirname ./packaging/package.sh
++ cd ./packaging
++ pwd
+ OURDIR=/home/brian/Documents/Programming/arunityx/Source/packaging
+ ARUNITYX_HOME=/home/brian/Documents/Programming/arunityx/Source/packaging/../..
+ '[' -f /home/brian/Documents/Programming/arunityx/Source/packaging/../Extras/artoolkitX/LICENSE.txt ']'
+ cd /home/brian/Documents/Programming/arunityx/Source/packaging
+ CONFIG_LOCATION=/SDK/include/ARX/AR/config.h
+ '[' '!' -f /SDK/include/ARX/AR/config.h ']'
+ CONFIG_LOCATION=/SDK/Frameworks/ARX.framework/Headers/AR/config.h
+ '[' '!' -f /SDK/Frameworks/ARX.framework/Headers/AR/config.h ']'
+ '[' -f /home/brian/Documents/Programming/arunityx/Source/packaging/../../Source/Package/Assets/Plugins/Android/arxjUnity.jar ']'
+ '[' -f /home/brian/Documents/Programming/arunityx/Source/packaging/../../Source/Package/Assets/Plugins/iOS/libARX.a ']'
+ '[' -f /home/brian/Documents/Programming/arunityx/Source/packaging/../../Source/Package/Assets/Plugins/x86_64/ARX.dll ']'
+ '[' -f /home/brian/Documents/Programming/arunityx/Source/packaging/../../Source/Package/Assets/Plugins/ARX.bundle ']'
+ echo 'You need to run ./build.sh <plattform> before packaging.'
You need to run ./build.sh <plattform> before packaging.
+ exit -1

Any ideas?

Consider making the Unity package UPM compatible

The modern way of deploying packages in Unity is via UPM (Unity Package Manager).

Consider updating the Unity package repository to match the UPM project layout, rather than making a .UnityPackage export, which is safer and provides versioning (plus allows publishing to OpenUPM)

https://docs.unity3d.com/Manual/cus-layout.html

A good example is the RealityCollective packages which have automation to manage building/testing and tagging for OpenUPM
https://github.com/realitycollective/com.realitycollective.service-framework

Unable to Run examples on Android:

When built for Android, running any of the example scenes on an Android device only results in the following errors:

2023/05/10 15:47:25.371 26967 26988 Info Unity ARController: Error starting running
2023/05/10 15:47:25.386 26967 26988 Info Unity ARController: Starting AR.
2023/05/10 15:47:25.386 26967 26988 Info Unity ARController: Render device: Vulkan 1.1.0 [0x00800000], using Unity texturing.
2023/05/10 15:47:25.387 26967 26988 Info Unity ARController: Starting artoolkitX video with vconf '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 15:47:25.387 26967 26988 Info libAR [info] Starting...
2023/05/10 15:47:25.387 26967 26988 Info libAR [info] Setting video configuration '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 15:47:25.387 26967 26988 Info libAR [info] Opening artoolkitX video using configuration '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 15:47:25.387 26967 26988 Info libAR [info] Using supplied video config "-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"".
2023/05/10 15:47:25.395 26967 26988 Debug VendorTagDescriptor addVendorDescriptor: vendor tag id 14172875900359437128 added
2023/05/10 15:47:25.403 26967 26988 Error ACameraManager openCamera: connect camera device failed: Status(-8, EX_SERVICE_SPECIFIC): '1: validateClientPermissionsLocked:1547: Caller "" (PID 10429, UID 26967) cannot open camera "0" without camera permission'
2023/05/10 15:47:25.404 26967 26988 Error libAR [error] status == ACAMERA_OK
2023/05/10 15:47:25.404 26967 26988 Error libAR [error] Failed to open camera.
2023/05/10 15:47:25.404 26967 26988 Info libAR [info] Using supplied video config "-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"".
2023/05/10 15:47:25.405 26967 26988 Error libAR [error] ar2VideoOpen: Error: module "Android" requires ar2VideoOpenAsync.
2023/05/10 15:47:25.405 26967 26988 Error libAR [error] Error: unable to open connection to camera using configuration '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 15:47:25.405 26967 26988 Error libAR [error] Unable to open video source.

In the scene, you are simply presented a box which states no camera was found.

The error prevents any other scripts from running.

Android arm64 build on "moto z" doesn't recognise the marker

Thanks for everyone keeping this tool alive and healthy :)

Intro
I used to work with arunity5 (https://github.com/hsnk/arunity5) which I think is more efficient.I mean the camera resolution and detection is great and more accurate. However, it doesn't support arm64 processor on android.

So, I had to move to arunityx because it is the only artoolkit unity that supports arm64 android build.

Issue
In "moto z play" phone, the app can not recognise the "hiro" marker (building the sample scene). or to be more accurate I had to go back with the phone cam and when a recognisition is stablished, the cube appear like floating way above the marker. like in the front of the cam.

on the other hand, the app on "Oppo A3" phone works fine (i.e. the cube is there above the marker). Does anyone have this issue??

Also,may be this is not the right place to ask, but is there any chance for arunity 5.3 to support arm64?

Again many thanks

Editor Crashing in Windows

Tried in 2018.4 and 2019.1

Tried using the files provided in the official release UnityPackage, and files taken from the latest commit.

Used the ARX dll that came with the package, and the ARX DLL that is in the latest version of ARToolkitX. Used the OpenGL DLLs found in the ARX package.

Brand-new, clean project.

HOWEVER - please note that I'm also having trouble getting the samples included with the Windows ARToolkitX demo working. They all report the following...

[error] Error: a required OpenGL function counld not be bound.
[error] Error initializing display of video frames from source.
[error] Unable to init ARVideoView.
[error] Error in ARController::drawVideoSettings()

This might be something completely different, since it appears to be in the PRESENTATION of the information. However, I've reported this on the artoolkitx issues list.

Unable to package ARUnityX

I attempted to follow the first 6 steps outlined in the quick start read me. ran both ./build.sh and attempted to run ./package.sh (in their respective locations) but when I run ./package.sh I get the following error:
sed: can't read s/artoolkitX for Unity Version (([0-9]+.[0-9]+)(.[0-9]+)?(r[0-9]+)?)/artoolkitX for Unity Version 1.0.5/: No such file or directory

I have tried making it 1.0.6 in which build failed and 1.0.2 (which is the default) which gives the same outcome as 1.0.5, any guidance would be appreciated. screenshot below is my console in git-bash. I am attempting to use it for unity on windows.

SharedScreenshot

iOS app - out of memory

Hello!
I can't run app to iOS with Unity3D, I get error in Xcode, when running app on device - "Out of memory".

Thank you!

2018-08-23 12:54:54.065377+0300 arbankx[10737:1217974] [info]   Read ImageSet.
2018-08-23 12:54:54.066458+0300 arbankx[10737:1217974] [info] Imageset contains 7 images.
2018-08-23 12:54:54.067365+0300 arbankx[10737:1217974] [error] Error reading JPEG file.
2018-08-23 12:54:54.067404+0300 arbankx[10737:1217974] [warning] Falling back to reading '/var/containers/Bundle/Application/A488DC6D-D322-4A9D-A134-FEE93F3F3891/arbankx.app/Data/Raw/gibraltar.iset' in ARToolKit v4.x format.
arbankx(10737,0x1b5c54b40) malloc: *** mach_vm_map(size=17833407189369618432) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
2018-08-23 12:54:54.068012+0300 arbankx[10737:1217974] [error] Out of memory!!```

Camera resolution in iOS

I am not able to figure out, how to set the right camera resolution in iOS. I get the following log:

018-08-19 12:55:26.443408+0200 helloar[4436:1828117] [info] No predefined camera parameters for device iPhone (Unknown model).
2018-08-19 12:55:26.443492+0200 helloar[4436:1828117] [info] Fetching external camera parameters.
2018-08-19 12:55:26.443599+0200 helloar[4436:1828301] [info] cparamSearch beginning search for apple/iPhone/iPhone10,4, camera 0, aspect ratio 4:3.
...
2018-08-19 12:55:27.678098+0200 helloar[4436:1828301] [warning] Using default camera parameters for 480x360 image size, 45 degrees vertical field-of-view.

Is this related to artoolkitx/artoolkitx#40 ? Due to cparamSearch.c it should try to curl from https://calibration.artoolkitx.org/app/calib_camera/download.php which does not seem to be offline. But when I sniff the apps traffic through Charles proxy, it doesn't try to connect to artoolkitx.org at all.

Is there any documentation, that could point me into the right direction?

arm64 function not 4-byte aligned: _unwind_tester from

I use artoolkitx to rebuild the SDK and examples for iOS, and use arunityx to rebuild unitybackage.(arunityX-1.0.6.unitypackage)
Use untiy to create a new project, import unitybackage(arunityX-1.0.6.unitypackage), export ios project, and then use xcode to open the ios project. Build the project.
Then there was a problem.

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/ms/Documents/unity_project_file/mac02all/macall/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
"_sqlite3_column_int", referenced from:
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_column_double", referenced from:
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_bind_text", referenced from:
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_column_text", referenced from:
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_open_v2", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_step", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_errcode", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_errmsg", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
l975 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_prepare_v2", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
l975 in libARX.a(libARX.a-arm64-master.o)
"_vImageRotate90_ARGB8888", referenced from:
l898 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_close", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
_cparamSearchFinal in libARX.a(libARX.a-arm64-master.o)
"_vImageHistogramCalculation_Planar8", referenced from:
_arImageProcLumaHist in libARX.a(libARX.a-arm64-master.o)
_arImageProcLumaHistAndCDF in libARX.a(libARX.a-arm64-master.o)
_arImageProcLumaHistAndCDFAndPercentile in libARX.a(libARX.a-arm64-master.o)
_arImageProcLumaHistAndOtsu in libARX.a(libARX.a-arm64-master.o)
_arImageProcLumaHistAndBoxFilterWithBias in libARX.a(libARX.a-arm64-master.o)
_arImageProcLumaHistAndCDFAndLevels in libARX.a(libARX.a-arm64-master.o)
"_vImageHorizontalReflect_ARGB8888", referenced from:
l898 in libARX.a(libARX.a-arm64-master.o)
"_sqlite3_finalize", referenced from:
_cparamSearchInit in libARX.a(libARX.a-arm64-master.o)
l975 in libARX.a(libARX.a-arm64-master.o)
"_vImageVerticalReflect_ARGB8888", referenced from:
l898 in libARX.a(libARX.a-arm64-master.o)
"_vImageBoxConvolve_Planar8", referenced from:
_arImageProcLumaHistAndBoxFilterWithBias in libARX.a(libARX.a-arm64-master.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Building Unity package without all ARToolKit libraries

Is it possible to build the package without ARToolKitx libraries? Because I am not able to understand

  1. I don't have ARTOOLKITX_HOME set.
  2. what to pass as a version number in arunityX-bin.sh

Error:
You need to run ./build.sh before packaging.
sed: /SDK/Frameworks/ARX.framework/Headers/AR/config.h: No such file or directory
Version number invalid!

Gradle build failed

I tried to run BarcodeScene example. At first, it said that ARX.dll was missing, but I used one of the solution provided by users in the issues. Now I'm having the issue on building gradle step. This is full error message:
`CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_171\bin\java.exe -classpath "D:\IDES\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'gradleOut'.

No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 59s
]
stdout[
Starting a Gradle Daemon (subsequent builds will be faster)
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1 progress, System.String error) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1 progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1 progress) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Any help on that matter?
I have linked my external tools, such as SDK and NDK to Unity preferences.

Getting started with ARToolKitX and Unity

Currently I'm looking for vuforia alternaitves and ARToolKit seems promising. As far I understand, ARToolKitX replaces it and seem to be in active development. And because I'm a Unity developer, this seem to be the right place.

So I checked the releases tab and the only release I found was the default.unitypackage.unity... downloaded, imported to Unity 2018.2.18 and voila:
import_artoolkitx

I never saw these errors nor a plugin, which tries to write to my C: drive.
This doesn't seem right. Very strange paths. Is anyone working with artoolkitx and unity?

Arunityx missing the utilities from artoolkitx

So it appears that the utilities (like genTexData and calib_optical) don't exist in the arunityx files. No worries, I downloaded both the artoolkit5 and artoolkitx. The artoolkit5 files seem to have all of them and the artoolkitx has most of them BUT they are in .c format with makefiles. I tried running the .c files as I would an .exe file in console but I got the error shown below:

image

Did this happen since the makefile wasn't used to create an .exe? If so, how would you recommend doing that on Windows? I have the windows-linux subsystem set up and considered using that but would like to ask first. Thank you

Android resolution low/blurry/pixelated

Hello,
I've been using arunityx to assist me in a AR project that I'm working on, but I'm facing an issue.
While testing the app in Unity everything is fine, but when I build it to android and test it in Android Studio, the video gets extremely low res, as show in the log. (I'll attach pictures showing what I mean, bellow)
After building the apk and testing it, the video is still low res. (just like Android Studio)
Any idea how to fix this?
arunitylowres
1
3

Emulated device: Nexus 5X
Tested devices:
Xiaomi Mi A1
Vodafone Ultra 6

Android JAR Gradle Build Not Working (Windows)

For some reason, the Gradle distribution chosen to rebuild the Android extras doesn't work in Windows - at least on my machine.

By updating the distribution to 4.6 instead of 4.1, it compiles successfully.

arwUpdateTexture32 crash on Windows

When running on Windows the Unity Player (also happens on standalone) crash as soon as we update the texture. I can't get anymore info on the crash because the Unity player just dies on the spot.
This problem does not happen on MacOS.
The pixel format detected is Video 640x360@1Bpp (AR_PIXEL_FORMAT_420f)
If i supply #-format=BGRA# into the ARController Video Config. (Windows) it gets the camera texture fine but not tracking occurs.
Anyone else experiencing this?

Thanks

Linux support?

can`t build this package in ArchLinux with this error:

./build.sh: line 232: cd: too many arguments

Full log:

+ test 1 -gt 0
+ case "$1" in
+ BUILD_ANDROID=1
+ shift
+ test 0 -gt 0
++ uname -s
+ OS=Linux
++ uname -m
+ ARCH=x86_64
+ TAR=/usr/bin/tar
+ '[' Linux = Linux ']'
++ /usr/bin/nproc
+ CPUS=4
+ TAR=/bin/tar
+ source /etc/os-release
++ NAME='Arch Linux'
++ PRETTY_NAME='Arch Linux'
++ ID=arch
++ BUILD_ID=rolling
++ ANSI_COLOR='0;36'
++ HOME_URL=https://www.archlinux.org/
++ DOCUMENTATION_URL=https://wiki.archlinux.org/
++ SUPPORT_URL=https://bbs.archlinux.org/
++ BUG_REPORT_URL=https://bugs.archlinux.org/
+ grep -qE '(Microsoft|WSL)' /proc/version
+ '[' ']'
+ echo 'start download of libs'
start download of libs
+ '[' ']'
+ '[' ']'
+ '[' 1 ']'
+ cd /home/omid/Desktop/ARToolkit Source/arunityx/Source
./build.sh: line 232: cd: too many arguments

package.sh is for mac only

Hello,

The package.sh script is for Mac only,

The last but one line, where Unity is called to create the package does not work on Windows.

I changed it for myself to

/cygdrive/c/Program\ Files/Unity-2018-1-6f1/Editor/Unity -quit -batchmode -nographics -stackTraceLogType Full -executeMethod ARToolKitPackager.CreatePackage -projectPath /home/peter/peter/Source/Repos/arunityx-master/Source/Package ARUnityX-1.0.2.unitypackage

This does not produce an error, but also does not create the ARUnityX-1.0.2.unitypackage.

Can anybody tell me what I am missing?

Unable to build for iOS with latest Xcode and iOS 16.4 platform

While I was previously able to build, I couldn't run on device as Apple has updated their Xcode platform.

Now I cannot even build as I get the following error in Unity:

EntryPointNotFoundException: arwRegisterLogCallback assembly: type: member:(null)
PluginFunctionsARX.arwRegisterLogCallback (PluginFunctionsLogCallback lcb) (at Assets/artoolkitX-Unity/Scripts/PluginFunctionsARX.cs:99)
ARController.OnDisable () (at Assets/artoolkitX-Unity/Scripts/ARController.cs:564)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:180)

I'm at a loss :S

Integrate marker creation with Unity Editor

Request from @SimonDarksideJ: allow entire workflow for marker creation to be run without leaving Unity Editor.

  • For 2D planar tracker, allow tracking point visualisation.
  • For square template markers, allow specification of marker image.
  • For square barcode markers, display in-Editor.

Add support for video background "fill" mode

In AR applications, the camera frustum is the same aspect ratio as the video background texture, but this may differ from the aspect ratio of the display. In video background "fill" mode, the video background texture completely fills the display, such that some of the video background may be outside the display bounds (i.e. cropped left/right or top/bittom).

Normally, this is done by scaling the viewport. See e.g. https://github.com/artoolkitx/artoolkitx/blob/master/Source/ARX/ARVideoView.cpp#L118. However, Unity doesn't accept negative values for a Camera's viewport left or bottom values, therefore an alternate approach is needed.

One such approach would be to crop the video background (set vertices to the same shape as the display, and adjust texture coordinates to match) but this also necessitates adjusting the generated artoolkit camera frustum; a little more complex! See https://github.com/artoolkitx/artoolkitx/blob/master/Source/ARX/AR/paramChangeSize.c

Unable to start AR tracking. Please check that you have a camera connected.

I suppose this is an old issue, see this post.

I got Unable to start AR tracking. Please check that you have a camera connected. error when I press Home button then go back to the app

void OnApplicationPause(bool paused)
{
//Log(LogTag + "ARController.OnApplicationPause(" + paused + ")");
if (paused)
{
if (_running)
{
StopAR();
_runOnUnpause = true;
}
}
else
{
if (_runOnUnpause)
{
StartAR();
_runOnUnpause = false;
}
}
}

I worked around it by commenting the StartAR() and StopAR() calls which works in iOS.
However in Android, I got error messages:

libAR: [error] ARController::androidVideoPushInit: ARVideoSource is either closed or already running.
E/CameraEventListenerUnityImpl: arwAndroidVideoPushInit failed

and the camera freeze.

How can I get the camera back to work when I get back to the application?

If the issue is already solved in this repo, could someone please point me to the part of code that is responsible for this? I am using some mixed Unity .cs from ARUnity6 and ARUnityX and I can't afford the time to replace the whole project with ARUnityX files now. Thanks.

Cannot turn on camera on Android device

Encountered some errors when running on Android device.

I only have this one device so could not test if this is a device specific issue, but no error when running on emulator.

ARproject I/CameraAccessHandlerImpl: CameraAccessHandlerImpl(): ctor called
ARproject I/AndroidUtils: onResume(): Cam2CaptureSurface constructed
ARproject I/CameraSurfaceImpl: surfaceCreated(): called
ARproject I/CameraSurfaceImpl: surfaceCreated(): will attempt to open camera "0", set orientation, set preview surface
ARproject I/CameraSurfaceImpl: surfaceChanged(): called
    openCamera2(): called
ARproject I/CameraManagerGlobal: Connecting to camera service
ARproject E/Unity: Unable to find __Internal

ARproject E/Unity: Unable to find __Internal
This one seemed not affecting much

ARproject I/OpenCV: calling android_getCpuFeatures() ...
    calling android_getCpuFeatures() ... Done (1f7ff)
ARproject I/libAR: [info] artoolkitX v1.0.2 initalised.
ARproject I/Unity: ARController: ARToolKit version 1.0.2 initialised.
     
ARproject I/Unity: ARController: Starting AR.
     
ARproject I/Unity: ARController: Render device: OpenGL ES 3.2 NVIDIA 361.00.
     
ARproject I/Unity: ARController: Starting ARToolKit video with vconf ' -cachedir="/storage/emulated/0/Android/data/xxx/cache"'.
     
ARproject I/libAR: [info] Starting...
    [info] Setting video configuration ' -cachedir="/storage/emulated/0/Android/data/xxx/cache"'.
    [info] Opening artoolkitX video using configuration ' -cachedir="/storage/emulated/0/Android/data/xxx/cache"'.
    [info] Using supplied video config " -cachedir="/storage/emulated/0/Android/data/xxx/cache"".
ARproject I/Unity: ARController: UpdateAR: Waiting for ARToolKit video.
     
ARproject I/libAR: [info] Waiting for video source.
ARproject I/libAR: [info] Waiting for video.
ARproject I/Unity: Finished loading scene General_models in 1.713779 seconds
     
ARproject D/CameraEventListenerUnityImpl: cameraStreamStarted
ARproject I/ARX_jni: Attempting to load library ARX.
ARproject I/ARController: Loaded native library.
    ARController(): ARController constructor
ARproject I/libAR: [info] Opened artoolkitX video 640x480@1Bpp (AR_PIXEL_FORMAT_NV21).
    [info] Fetching external camera parameters.
ARproject I/libAR: [info] cparamSearch beginning search for google/Pixel C/dragon, camera 0, aspect ratio 4:3.
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.

After 5 minutes of not running

ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject I/libAR: [info] Fetched 5 camera calibration records from online database.
ARproject I/libAR: [info] Matched fetched camera calibration record (1440x1080, 0.00).
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject I/libAR: [info] Matched fetched camera calibration record (640x480, 0.00).
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject E/libAR: [error] ARController::androidVideoPush2: ARVideoSource is not running.
ARproject E/libAR: [error] ar2VideoPushAndroid2: Error: unexpected buffer size (368512) for format YUV_420_888.
ARproject I/libAR: [info] Video source is running. (Waited 14611 calls.)
ARproject I/Unity: LoadingText update
     
ARproject I/Unity: ARController: UpdateAR: ARToolKit video is running. Configuring Unity scene for video.
     
ARproject I/Unity: ARController: Video 640x480@1Bpp (AR_PIXEL_FORMAT_NV21)
     
ARproject I/Unity: ARController: Projection matrix: [
    18.40825	0.00000	-0.00107	0.00000
    0.00000	24.52116	0.01076	0.00000
    0.00000	0.00000	-1.00401	-0.02004
    0.00000	0.00000	-1.00000	0.00000]
     
ARproject I/Unity: ARController: Video size 640x480 will use texture size 640x480.
     
ARproject I/Unity: ARController: Scene configured for video.
     
ARproject E/libAR: [error] ar2VideoPushAndroid2: Error: unexpected buffer size (368512) for format YUV_420_888.
ARproject E/libAR: [error] ar2VideoPushAndroid2: Error: unexpected buffer size (368512) for format YUV_420_888.

Error: unexpected buffer size (368512) for format YUV_420_888.
What does this mean?

EDIT:

The device is running on Nougat (7.0.0)
Camera is set to 640x480, thus the buffer size should be 406800, I don't understand where 368512 comes from.
Here is what the planes from reader.acquireLatestImage() look like

Plane[0]

  • Buffer 368512
  • PixelStride 1
  • RowStride 768

Plane[1]

  • Buffer 122688
  • PixelStride 1
  • RowStride 512

Plane[2]

  • Buffer 122688
  • PixelStride 1
  • RowStride 512

Preview Image not comming

I was trying to build unity example name 2DScene with virsion Artoolkitx.1.1.4 but I am not getting proper Image of preview image is coming as random rgb image. My unity version 21.3.13f1
image

such random image is comming.

DllNotFoundException: ARX

Hello, I know the is a similar issue but mine is different. I downloaded the released package of arunityx, imported it open a example scene and when I try to build the program that error pops up.

I will copy the full error.

DllNotFoundException: ARX
PluginFunctionsARX.arwInitialiseAR (Int32 pattSize, Int32 pattCountMax) (at Assets/artoolkitX-Unity/Scripts/PluginFunctionsARX.cs:102)
ARController.InitializeAR () (at Assets/artoolkitX-Unity/Scripts/ARController.cs:400)
ARController.StartAR () (at Assets/artoolkitX-Unity/Scripts/ARController.cs:575)
ARController.UpdateAR () (at Assets/artoolkitX-Unity/Scripts/ARController.cs:748)
ARController.Update () (at Assets/artoolkitX-Unity/Scripts/ARController.cs:474)

I don't know where that dll should be, so i can't see if it's there. Am i missig something? did I do something wrong?

I'm building it for android.

By the way I did the same thing with arunity5 and it works fine-ish, it have that long time black screen problem because of the camera calibration so I would really like to be able to use arunityx. Thanks for the help.

Missing arm64-v8a in Unity Android Build

Hi ARToolkit Community,
First of all thank you for keeping running the ARToolkit project!

I followed the Getting Started Guide and was able to run on MacOS Editor, on iOS and Android phones with few changes ( I can share if somebody finds it useful ), but noticed that arm64-v8a for Android is missing from the generated unity package. Any reason it is missing? I see the library in the ARToolkitX SDK for Android so maybe I am missing something.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.