Giter Club home page Giter Club logo

depthai-unity's Introduction

OAK For Unity

License: MIT  unity 2020.3.20f1   unity 2021.2.7f1   unity URP   unity HDRP   unity Builtin  

Power Your Unity Projects with Advanced Spatial AI Using OAK

Elevate Unity Development with OAK: Advanced AI and Computer Vision


Versatile Application Support

Enables a broad range of applications, from interactive installations and games to health and sports monitoring, VR experiences, and more


Ready-to-Use AI Models

Provides a high-level API with a variety of pretrained models for rapid deployment of AI features like face and emotion recognition, and object detection.


Comprehensive Sensor Data Access

Provides access to OAK device streams including RGB, mono images, depth, and IMU data, enhancing the sensory input for Unity developers


Streamlined Integration

Easy installation from the GitHub repository with Unity project example, and coming soon on the Unity Asset Store.

Table of Contents

Get started

This repository contains Unity project with examples, inside the folder OAKForUnity/URP

Notice that plugin core is non-dependent of render pipeline, but some examples like point cloud VFX requires Visual Effect Graph.

Easy way to start is explore the examples inside this project. Just need Unity and OAK device.

  • Clone the repository to location on your local machine

    git clone https://github.com/luxonis/depthai-unity.git
  • Install Unity (recommend latest 2021.3.x LTS)

Windows 10/11

  • If you're using Windows 10/11 you don't need to install anything special to have OAK device up and running.

MacOS

  • libusb1 development package (MacOS & Linux only)
    brew install libusb
  • OpenCV 4.5
    brew install opencv@4

(see below how to compile the C++ library)

Linux

Ubuntu

  • libusb1 development package (MacOS & Linux only)
    sudo apt install libusb-1.0-0-dev cmake git-all
  • OpenCV 4.5
    sudo apt install libopencv-dev

Fedora

  sudo dnf install libusb1-devel opencv-devel cmake gcc gcc-c++ git

if you get any message related to udev rules try:

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Steps:

  • Open Unity project under folder OAKForUnity/URP
  • Click on menu option "OAK For Unity" -> "Example scenes"
  • Hit play

Important: Connect OAK device using USB3 cable for optimal experience

Examples

Unity project OAKForUnity/URP includes following examples. Each example has its own unity scene and C# script showing how to use the results from the pipeline and has its own C++ pipeline.

Unity scenes could be found under folder Plugins/OAKForUnity/Example scenes/

and C++ pipelines under folder src/

Playground

Main menu to explore all the examples

Go to menu on top: "OAK For Unity"->"Example scenes" and hit play

Streams

Access to device camera streams, including stereo, depth and disparity

Point cloud / VFX

Point cloud generation from depth

Face Detection

Face detector model running on OAK

Face Emotion

Face detector model running on OAK

Object Detection

Object detection using tiny yolo model

Head Pose

Head pose estimation

Unity Bridge

Color camera preview

Color camera preview using depthai-python example.

Hand Traking (Blaze hands through Unity Bridge)

Hand tracking using excellent python repo from geaxgx

Requirements to run this example:

git clone https://github.com/luxonis/depthai-unity.git
git submodule update --init --recursive
cd unity_bridge 
python -m pip install -r requirements.txt 
python .\depthai_hand_tracking_unity_bridge.py --use_world_landmarks --gesture

Using right hand gesture "FIST" + hand rotation controls scene sun rotation.


For more information take a look at Unity Bridge

Build C++ library

How it works

Unity standard plugin mechanism (usual in other platforms) is based on dynamic library interface between C# and C++ (depthai-core library) in this case.

We provide some prebuild libraries with the unity project, but also full source code could be found under src/ folder to build library your own.

How to integrate your own pipelines

In case you want to extend the unity project or your own project with your own pipelines, you need to develop C++ depthai pipeline, C# interface and compile dynamic library.

Under folder src you could find the C++ pipelines implementation for plugin examples, that could be good starting point to develop your own pipeline.

Before C++ implementation, there is option to develop in python and use unity bridge to experiment inside unity.

To build the plugin library follow steps below:

Windows 10/11

  git submodule update --init --recursive
  cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
  cmake --build build --config Release --parallel 12
  mkdir OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Windows
  cp build/Release/depthai-unity.dll OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Windows
  cp build/depthai-core/Release/depthai-*.dll OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Windows

MacOS (dylib)

  git submodule update --init --recursive
  cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
  cmake --build build --config Release --parallel 8
  mkdir OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/macOS
  cp build/libdepthai-unity.dylib OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/macOS
  cp build/depthai-core/libdepthai-* OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/macOS

Linux (.so)

  git submodule update --init --recursive
  cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
  cmake --build build --config Release --parallel 4
  mkdir -p OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux
  cp build/libdepthai-unity.so OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux
  cp build/depthai-core/libdepthai-* OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux

We provide a small framework, taking care of unity life-cycle, so it's easy to extend the interface with your specifc use cases and custom models.

How to integrate on your own unity project

Unity project includes main menu to navigate throught the examples. In case you want to integrate the core of the plugin with your own project, it's easy to export the core framework as .unitypackage.

We're currently working to provide the plugin through Scopely and Unity AssetStore so would be much easier to add the plugin to your project.

Unity Bridge (python)

Since we released the initial version of the plugin, we got many feedback about the pain points to develop and extend the plugin. One main recurrent feedback is the need to develop the pipeline in C++ making slow the developing cycle. We know by self-experience.

DepthAI library comes also in Python flavour, so many community projects are available only on Python. Also developing with python is much more convenient, even to develop only a prototype, as there is no need to compile and reload dynamic libraries.

In the future we want to explore also the creation of C# wrapper around depthai-core C++ library.

Unity Bridge is simple TCP socket bridge between Unity C# (using Netly) and Python, enabling reliable client/server approach:

  • Reliable client/server approach based on TCP socket, similar to other unity python integrations like ROS-TCP connector

  • Allows faster dev interations without C++ implementation and compilation

  • Allows to integrate very easly community projects only available on Python

  • Allows to develop prototype and after validation, develop the pipeline in C++ if you prefer to pack in dynamic library

  • Allows to deploy application on other client platforms (lightweight, not supported like VR, mobile, ...) thanks to the client-server architecture - for example, external VR apps

How it works

Unity app would act as client, DepthAI python app would act as server.

Remember to start the server before playing the unity scene

In this initial version, client is expecting to request image and results to the server.

On Unity side, we decided to rely on Netly framework as it's production ready and bullet-proof on many projects during time.

It's integrated on the same framework that request results from dynamic library, so it's very similar to integrate and even allow compatibility between the standard C++ and python modes in the future.

Installation

Requirements are very similar to run any depthai python application.

For python we recommend to use conda environment:

conda create -n depthai-unity-env python==3.10 -y
conda activate depthai-unity-env
cd unity_bridge 
python -m pip install -r requirements.txt 

How to integrate external projects

Usually DepthAI application runs on main loop (while) where oak camera pipeline is running and returning results from AI models.

python server app

We used the color camera preview example from the python repository to illustrate the process and you can find under unity_bridge/test_unity_bridge.py

  • Initialize unity bridge
  • Prepare data serialization
  • Send data back to Unity

We prepared dynamic serialization to make more easy send data back to unity from python.

python test_unity_bridge.py

Start python server with OAK color camera preview, waiting for client to connect.

unity client app

Inside the unity project, you will find new folders under Example Scenes and Scripts called UnityBridge

Open scene called Test and hit play. You should see oak color camera preview and some placeholder results from python.

Important: start server first before starting client

Important: remember OAK devices can only run one pipeline at time, so it's not possible to run C++ examples if python server app is running at same time, so remember stop server app, in case you want to run other apps

Hand Tracking - depthai_hand_tracker by geaxgx

start server: python .\depthai_hand_tracking_unity_bridge.py --use_world_landmarks --gesture

unity client scene: HandTracking.unity under folder Example Scenes/UnityBridge

What's new

  • 2024/1/30: Complete examples with python unity bridge and hand tracking example

Known issues

  • If you're using OAK-1 (don't have stereo depth support) you need to disable depth on the examples, to prevent crash. UseDepth = false; config.confidenceThreshold = 0;

  • If you just use the precompiled depthai-unity library inside Unity, be sure you're using latest version.

Roadmap

Help build the roadmap checking out our Roadmap discussion and feel free to explain about your use case.

Contributions and Acknowledgments

First of all, Special thanks to @sliwowitz and @onuralpszr for their contribution and patience with Linux support !

Community Projects

Are you building spatial app using OAK For Unity? Please DM and will be a pleasure to add a reference here

Acknowledgments

  • Point cloud VFX examples are based on great work by Keijiro Takahashi

  • Unity bridge uses Netly for TCP socket communication.

  • Depthai hand tracking python project by Geaxgx

How to contribute in this repository

Everyone is more than welcome to contribute on this repository.

Contribution guide:

  • fork the repository
  • create new feature/bug branch
  • make, commit and push your changes
  • open pull request (PR) for development branch

After Your Pull Request is submitted, the project maintainers will review your PR. They might request some changes. Keep an eye on your GitHub notifications and be responsive to feedback. Once the PR is approved and passes all checks, a maintainer will merge it into the development branch.

Compatibility

Platform Unity Render Pipeline
Windows 2021.2.7f1 ALL
MacOS 2021.2.7f1 ALL
Linux 2021.3.22f1 ALL (tested URP)

Related links

License

OAK For Unity is licensed under MIT License. See LICENSE for the full license text.

depthai-unity's People

Contributors

gespona 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  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  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  avatar  avatar

depthai-unity's Issues

Setup beta branch with Unity (WINDOWS)

Follow these steps should be fine:

  • Clone repository: git clone https://github.com/luxonis/depthai-unity.git On Windows I'm using git bash.
  • cd depthai-unity/
  • Checkout 'beta' branch: git checkout beta
  • Open Unity hub.
  • You need Unity 2021.2.7f
  • Add unity project: "Add" button on Hub 2.x "Open" -> "add project from disk" on Hub 3.x
  • Select folder <path_repo_cloned>\OAKForUnity\URP
  • In Unity open scene: Plugins\OAKForUnity\Example Scenes\Streams
  • Hit play

Point cloud Visualization and shading

Hello,

I found this repository via this video on youtube

I'm actually only looking for a way to make a point cloud lit the same way a mesh would. In this video, I noticed that the shadow of the person's arm appears on its chest when it moves. Is this shadow a result of a unity or custom shader, or is it just already in the dynamic point cloud data? If the first suggestion, how did you make this possible?

Also, is there a repo or something where I can find the unity project of the video ?

Impossible to build with latest repo on Windows 10

As a first step towards building my own pipeline I've tried to use the code in this repo to rebuild the pipeline on my machine. I have the environment correctly configured and I'm able to build the depthai-unity.dll to configure the pipeline, but Unity throws the error below:
image

Any ideas what I'm doing wrong? Or is there documentation on how to build this somewhere? (I couldn't find it)

Editor crashes when stopping a running scene on Linux

When I run any of the example scenes - the Playground main scene or any of the sub-scenes in ..., the Editor dies after I click the play button the second time to stop the scene.

Device: OAK-D-Lite
Unity: 2021.2.7f1

OS: Ubuntu 21.10 x86_64
Kernel: 5.13.0-27-lowlatency
CPU: Intel i7-7820X @3.60 GHz, 8 physical cores
GPU: NVIDIA TITAN RTX, driver version 470.86
Memory: 64 GB

The setup is the same as described in issue #8, only now what I do is:

  • open a scene in editor
  • push the play button to start preview run
  • push the play button to stop preview run
  • the editor crashes

I tried to run in gdb again

gdb /opt/unity/2021.2.7f1/Editor/Unity

Only this time there were more bogus signals trapped when I didn't want to, so to set up gdb:

set mi-async 1
set pagination off
set non-stop on
handle SIGXCPU SIGPWR SIG36 SIG37 nostop noprint
run -projectPath ~/hax/depthai-unity/OAKForUnity/URP/

Now I open the scene in the editor, push the play button, wait for the scene to fully load, go to gdb again and hit Ctrl+C

handle SIGXCPU stop print
continue

Now I hit the play button again to stop the running scene. The Editor dies, and I get a stack trace (actually about 30 killed threads, only number 1 seems to be relevant):

Thread 1 "Unity" received signal SIGXCPU, CPU time limit exceeded.
backward::SignalHandling::sig_handler (signo=0, info=0x3db61d19, _ctx=0xbf7efc623c114bb3) at /home/strazce/.hunter/_Base/062a19a/e4f2f5b/72dac15/Install/include/backward.hpp:4263
4263	  sig_handler(int signo, siginfo_t *info, void *_ctx) {
(gdb) thread 1
[Switching to thread 1 (Thread 0x7fffed3ad340 (LWP 167877))]
#0  backward::SignalHandling::sig_handler (signo=0, info=0x3db61d19, _ctx=0xbf7efc623c114bb3) at /home/strazce/.hunter/_Base/062a19a/e4f2f5b/72dac15/Install/include/backward.hpp:4263
4263	  sig_handler(int signo, siginfo_t *info, void *_ctx) {
(gdb) bt
#0  backward::SignalHandling::sig_handler(int, siginfo_t*, void*) (signo=0, info=0x3db61d19, _ctx=0xbf7efc623c114bb3) at /home/strazce/.hunter/_Base/062a19a/e4f2f5b/72dac15/Install/include/backward.hpp:4263
#1  0x00007ffff0207520 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff020780a in __GI___sigsuspend (set=0x7ffedc5e11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
#3  0x00007ffedc2a47ac in GC_suspend_handler_inner () at /opt/unity/2021.2.7f1/Editor/Data/MonoBleedingEdge/MonoEmbedRuntime/libmonobdwgc-2.0.so
#4  0x00007ffedc2a4665 in GC_suspend_handler () at /opt/unity/2021.2.7f1/Editor/Data/MonoBleedingEdge/MonoEmbedRuntime/libmonobdwgc-2.0.so
#5  0x00007ffff0207520 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#6  __futex_abstimed_wait_common64 (private=<optimized out>, cancel=true, abstime=0x7fffffffc0f0, op=393, expected=0, futex_word=0x7ffceff36940 <schedulerState+24832>) at futex-internal.c:57
#7  __futex_abstimed_wait_common (cancel=true, private=<optimized out>, abstime=0x7fffffffc0f0, clockid=0, expected=0, futex_word=0x7ffceff36940 <schedulerState+24832>) at futex-internal.c:87
#8  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7ffceff36940 <schedulerState+24832>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x7fffffffc0f0, private=<optimized out>) at futex-internal.c:139
#9  0x00007ffff02617f0 in do_futex_wait (sem=sem@entry=0x7ffceff36940 <schedulerState+24832>, abstime=abstime@entry=0x7fffffffc0f0, clockid=0) at sem_waitcommon.c:112
#10 0x00007ffff0261893 in __new_sem_wait_slow64 (sem=0x7ffceff36940 <schedulerState+24832>, abstime=0x7fffffffc0f0, clockid=0) at sem_waitcommon.c:184
#11 0x00007ffcef4be377 in XLink_sem_timedwait () at /home/strazce/hax/depthai-unity/build/depthai-core/libdepthai-core.so
#12 0x00007ffcef4bb203 in DispatcherWaitEventCompleteTimeout () at /home/strazce/hax/depthai-unity/build/depthai-core/libdepthai-core.so
#13 0x00007ffcef4b8dff in XLinkResetRemoteTimeout () at /home/strazce/hax/depthai-unity/build/depthai-core/libdepthai-core.so
#14 0x00007ffcef4a8faa in dai::XLinkConnection::close() (this=0x55556730b6e0) at /home/strazce/hax/depthai-unity/depthai-core/src/xlink/XLinkConnection.cpp:186
#15 0x00007ffcef2fbb21 in dai::DeviceBase::closeImpl() (this=0x55555a883480) at /home/strazce/hax/depthai-unity/depthai-core/src/device/DeviceBase.cpp:369
#16 0x00007ffcef2e8508 in dai::Device::closeImpl() (this=0x55555a883480) at /home/strazce/hax/depthai-unity/depthai-core/src/device/Device.cpp:82
#17 0x00007ffcef2fbacd in dai::DeviceBase::close() (this=0x55555a883480) at /home/strazce/hax/depthai-unity/depthai-core/src/device/DeviceBase.cpp:359
#18 0x00007ffdaab221c9 in DAICloseDevice(int) (deviceNum=0) at /home/strazce/hax/depthai-unity/src/device/DeviceManager.cpp:207
#19 0x0000000040762fb3 in  ()
#20 0x00007fffffffca00 in  ()
#21 0x000055555e72d010 in  ()
#22 0x00007fffffffc8b0 in  ()
#23 0x00007ffda9e2aa80 in  ()
#24 0x00007ffda9e2aa80 in  ()
#25 0x000055555caa4638 in  ()
#26 0x0000000040762f11 in  ()
#27 0x000055555b6b4f10 in  ()
#28 0x00007fffffffc6c0 in  ()
#29 0x00007fffffffc5f0 in  ()
#30 0x0000000000000000 in  ()

Full resolution Color image

Thank you for these very nice demos indeed.
I noticed you are visualizing the low-resolution Preview of the color stream.

Is there a way to get the HD or even full 4K resolution from the camera? If so, where do we need to modify it? (At the moment when the Preview is turned off, we get no images at all)

depthai_hand_tracking_unity_bridge crashes with the -xyz parameter

Hello,

when I run depthai_hand_tracking_unity_bridge.py with the --xyz parameter, 9 out of 10 times, the process crashes.

The error is:

[1844301021AD6B1200] [2.1.2] [2.323] [system] [critical] Fatal error. Please report to developers. Log: 'Fatal error on MSS CPU: trap: 00, address: 00000000' '0'
F: [global] [         0] [ThreadN] dispatcherResponseServe:928  no request for this response: XLINK_WRITE_RESP 1

Traceback (most recent call last):
  File "C:\Škola\depthai-unity\unity_bridge\depthai_hand_tracking_unity_bridge.py", line 112, in <module>
    frame, hands, bag = tracker.next_frame()
                        ^^^^^^^^^^^^^^^^^^^^
  File "C:\Škola\depthai-unity\unity_bridge/depthai_hand_tracker\HandTracker.py", line 499, in next_frame
    in_video = self.q_video.get()

Any ideas how to fix this? Thanks!

UVC + remainder of kickstarter Unity roadmap updated ETA?

Hi Gespona, hope you're good, and thanks for plugging away on the Unity integrations. We picked up some OAK-D Lite's back in the 2021 kickstarter and have patiently been waiting on UVC, as well as the other features the team were promising during the campaign. For almost all of our intended use cases, the devices we bought are effectively duds until most of the remaining features are implemented.

Work on the Unity support side has taken a lot longer than we had been hoping for. After killing off realsense development, we thought OAK-D lite's were aiming to fill that gap for Unity native fullbody suitless mocap by this stage, but it's increasingly feeling like that may just have been some blue skies kickstarter marketing from the team if they've only allocated resources to have one person on the task, and so we're wondering if it's at all possible to have an updated timeline for completion of the remaining example implementations that are still in the works?

Also 2020 sucks! Would it be at all possible to extend support, either back to the 2019LTS final release (it's so much faster loading in a lot of situations), or just bump the completed examples to the current 2021LTS at some point in the near future?

Cheers!

Got error when builded the project in window - This application has requested the runtime to terminate it in an unusaual way

Hello, we have the oak-d lite and we are trying to use the body pose (from the example scene). In the Unity editor, it runs properly, but when we make a build, it crashes and who the error as below.
image

Unity version - 2021.2.7f1
OAK-D Lite, and we also tried on OAK-D Wide
Window 11

We are also aware that also happen to other examples that require AI models like face detection or face emotion.

Any idea on how to fix this?

Playground build dies when switching scenes on Linux

I'm trying to run depthai-unity on Ubuntu with an OAK-D-Lite sensor. If I build the Playground scene, it dies when attempting to switch (sub)scenes by the arrow buttons, or the menu button.

I managed to build the shared libraries so that Unity can use them, the project loads fine and mostly works in the Editor (except for a possibly different issue #9). At first, this bug consistently happened to me in the Editor too. Now I can reproduce it in the Editor just occasionally, but it still happens every time if I run the built binary.

Device: OAK-D-Lite
Unity: 2021.2.7f1

OS: Ubuntu 21.10 x86_64
Kernel: 5.13.0-27-lowlatency
CPU: Intel i7-7820X @3.60 GHz, 8 physical cores
GPU: NVIDIA TITAN RTX, driver version 470.86
Memory: 64 GB

Steps to reproduce:

0. Get the code

I'm using the beta branch.

1. Build depthai-core

cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
cmake --build build --config Debug --parallel 8
cmake --build build --target install

2. Build depthai-unity shared library .so

Add SHARED keyword to the add_library directive in CMakeLists.txt, line 35, then run:

cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
cmake --build build --config Debug --parallel 8

(BTW, even with these settings, libdepthai-resources.a is still built as a static library)

3. Copy the library to the project plugin folder

mkdir -p OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux
cp build/libdepthai-unity.so OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux
cp build/depthai-core/libdepthai-* OAKForUnity/URP/Assets/Plugins/OAKForUnity/NativePlugin/Linux

4. Convert the loader.mp4 video to webm

Unity complained about the loader.mp4 file Error while reading movie: ....../Playground/loader.mp4 and VideoClip import error for......./loader.mp4. On Linux, import of VP8 movies (.webm extension) is supported. So I converted the mp4 to webm using ffmpeg. The video plays fine in the editor. The command was ffmpeg -i loader.mp4 -c:v libvpx -crf 30 -b:v 0 -b:a 128k -c:a libvorbis loader.webm.

5. Open the project

  • Open the Unity project
  • Open the Playground scene
  • Replace loader.mp4 with loader.webm in Playground Menu -> Loader Object
  • Build the project (Development build here, but Release dies the same way)
  • Run the binary
  • Initial scene loads (though the camera seems to be looking the wrong way)
  • Try to switch scenes using the arrow buttons or bring up the scene selection menu
  • Crash with CPU time limit exceeded (core dumped)

6. Run in gdb

SIGXCPU is also thrown if a thread dies and gdb makes a pause - other threads are killed with SIGXCPU after you try to continue, there's also a bunch of uninteresting SIGPWR thrown, so first disable the SIGXCPU and SIGPWR traps before we get near the crash we want to see.

Go to where the build lives, run gdb ./Build1.x86_64

set mi-async 1
set pagination off
set non-stop on
handle SIGXCPU SIGPWR nostop noprint
run

Let the scene run, and just before you decide to switch scenes, go back to gdb, and press Ctrl+C

handle SIGXCPU stop print
continue

Switch back to the scene, click the menu button or the arrows. The scene hangs, and gdb has a stack trace ready:

Thread 70 "Build1.x86_64" received signal SIGXCPU, CPU time limit exceeded.
0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
(gdb) 
Thread 60 "Loading.Preload" received signal SIGXCPU, CPU time limit exceeded.
0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	in ../sysdeps/unix/sysv/linux/sigsuspend.c

Thread 19 "Finalizer" received signal SIGXCPU, CPU time limit exceeded.
0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	in ../sysdeps/unix/sysv/linux/sigsuspend.c


(gdb) thread 19
[Switching to thread 19 (Thread 0x7fffa78af640 (LWP 164117))]
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	in ../sysdeps/unix/sysv/linux/sigsuspend.c
(gdb) bt
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
#1  0x00007fffa7f947ac in GC_suspend_handler_inner () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#2  0x00007fffa7f94665 in GC_suspend_handler () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#3  <signal handler called>
#4  0x00007ffff4ba2ff7 in __futex_abstimed_wait_common64 (private=<optimized out>, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fffa82cf3f8) at futex-internal.c:57
#5  __futex_abstimed_wait_common (cancel=true, private=<optimized out>, abstime=0x0, clockid=0, expected=0, futex_word=0x7fffa82cf3f8) at futex-internal.c:87
#6  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fffa82cf3f8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=<optimized out>) at futex-internal.c:139
#7  0x00007ffff4baea1f in do_futex_wait (sem=sem@entry=0x7fffa82cf3f8, abstime=0x0, clockid=0) at sem_waitcommon.c:112
#8  0x00007ffff4baeab8 in __new_sem_wait_slow64 (sem=0x7fffa82cf3f8, abstime=0x0, clockid=0) at sem_waitcommon.c:184
#9  0x00007fffa7f539a9 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#10 0x00007fffa7f1cee4 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#11 0x00007fffa7f1cda6 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#12 0x00007fffa7f961dc in GC_inner_start_routine () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#13 0x00007fffa7f95e6f in GC_start_routine () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#14 0x00007ffff4ba6927 in start_thread (arg=<optimized out>) at pthread_create.c:435
#15 0x00007ffff4c369e4 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100


(gdb) thread 60
[Switching to thread 60 (Thread 0x7fff1010c640 (LWP 164158))]
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	in ../sysdeps/unix/sysv/linux/sigsuspend.c
(gdb) bt
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
#1  0x00007fffa7f947ac in GC_suspend_handler_inner () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#2  0x00007fffa7f94665 in GC_suspend_handler () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#3  <signal handler called>
#4  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#5  0x00007ffff75498de in vp8_loop_filter_bv_y_sse2 () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/UnityPlayer.so
#6  0x00007ffff635e4e0 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/UnityPlayer.so
#7  0x00007ffff635e3a3 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/UnityPlayer.so
#8  0x00007ffff66339f2 in ?? () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/UnityPlayer.so
#9  0x00007ffff4ba6927 in start_thread (arg=<optimized out>) at pthread_create.c:435
#10 0x00007ffff4c369e4 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100


(gdb) thread 70
[Switching to thread 70 (Thread 0x7ffe80207640 (LWP 164229))]
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
26	in ../sysdeps/unix/sysv/linux/sigsuspend.c
(gdb) bt
#0  0x00007ffff4b5480a in __GI___sigsuspend (set=0x7fffa82d11a0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:26
#1  0x00007fffa7f947ac in GC_suspend_handler_inner () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#2  0x00007fffa7f94665 in GC_suspend_handler () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
#3  <signal handler called>
#4  0x00007ffff4c381f4 in __libc_recvfrom (fd=57, buf=0x7ffe802044a0, len=40, flags=0, addr=..., addrlen=0x7ffe80204480) at ../sysdeps/unix/sysv/linux/recvfrom.c:27
#5  0x00007fffa6b613b3 in tcpip_get_devices () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/Plugins/libdepthai-core.so
#6  0x00007fffa6b603f3 in XLinkPlatformFindArrayOfDevicesNames () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/Plugins/libdepthai-core.so
#7  0x00007fffa6b58533 in XLinkFindAllSuitableDevices () from /home/strazce/hax/depthai-unity/OAKForUnity/URP/Build1_Data/Plugins/libdepthai-core.so
#8  0x00007fffa6b4804c in dai::XLinkConnection::getAllConnectedDevices (state=X_LINK_ANY_STATE) at /home/strazce/hax/depthai-unity/depthai-core/src/xlink/XLinkConnection.cpp:79
#9  0x00007fffa42d3a56 in DAIGetAllDevices () at /home/strazce/hax/depthai-unity/src/device/DeviceManager.cpp:51
#10 0x00007fffa42d4c5c in GetAllDevices () at /home/strazce/hax/depthai-unity/src/device/DeviceManager.cpp:173
#11 0x00000000402cae98 in ?? ()
#12 0x00007fff1c7f72a0 in ?? ()
#13 0x00007ffeeca4e120 in ?? ()
#14 0x00007ffeeca4e120 in ?? ()
#15 0x00007ffeeca4e120 in ?? ()
#16 0x00007fffa8867d20 in ?? ()
#17 0x0000000000000000 in ?? ()
(gdb) 

Bump to depthai-core version and unity version.

Hello, I tried with latest Unity LTS version (2021.3.15f1) along with latest depthai-core version, in first I was having some problems when I switched to scene because "camera" wasn't close properly and unity crash. But if I update unity and depthai core latest version it fixes most of the problems. Except face emotion and basic ones not working. (It could be just linux isssue or something else) but in the beginning I was not able to even switch properly scene to scene. (I have OAK-D and OAK-D Lite) For tests I used mainly OAK-D device.

Support for PoE Devices

Hi,

Thank you for creating this great plugin.

I am trying to run your code in the Unity Editor on Windows. We have several PoE cameras, and they do show up and detected
with a name the same as their IPs.
However, the demos will not show any image or connect to the cameras and crash after a few seconds.

Do you have any suggestions?

Thank you for your help in advance.
Sincerely
Barnabas Takacs

OAK-D crash with Face Detection.

Hi,
I have an OAK-D Pro Wide OV9782 Camera and I d'like to use it as head tracking.

I have tried OAK For Unity project but it's not working as expected.

The first scene with Basic streams is working well but all other scenes (Body Pose or Face Detection) crash with a Runtime Error (error C++). I can't see any information in log.

An other point is Head Pose is not available. Any information about a release date ?

I am running on Windows 10 with Unity 2021.3.30f. Is there any drivers to add, security or project settings to set ?

Thanks,

DepthAI Crashes on Pointclouds using OAK-D

Hi,

I'm trying the URP demo scenes. Everything works fine on windows apart from the pointcloud scenes. This one crashes after running for 30 seconds or so. I'm an oak-d.

Could this be to the fact that this device is not suitable for pointclouds, due to to lack of a time of flight module?

Here is the managed stacktrace:

=================================================================
	Native Crash Reporting
=================================================================
Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Managed Stacktrace:
=================================================================
=================================================================
Received signal SIGSEGV
Obtained 17 stack frames
0x00007ff614934411 (Unity) WindowsVideoMedia::GetFirstReadyTextureTime
0x00007ff61593c566 (Unity) VideoMediaTextureOutput::ConsumeFrame
0x00007ff61491cd35 (Unity) VideoClipPlayback::GetTextureAtTimeInternal
0x00007ff614922db1 (Unity) VideoPlayback::GetTexture
0x00007ff614918fed (Unity) VideoPlayer::VideoUpdate
0x00007ff614918e3e (Unity) VideoManager::VideoUpdate
0x00007ff6149028fc (Unity) `InitializeVideoManagerCallbacks'::`2'::PreUpdateUpdateVideoRegistrator::Forward
0x00007ff613c45bda (Unity) ExecutePlayerLoop
0x00007ff613c45d66 (Unity) ExecutePlayerLoop
0x00007ff613c4be49 (Unity) PlayerLoop
0x00007ff614bbdab9 (Unity) PlayerLoopController::UpdateScene
0x00007ff614bbbc5b (Unity) Application::TickTimer
0x00007ff615010fba (Unity) MainMessageLoop
0x00007ff61501588b (Unity) WinMain
0x00007ff6163f315e (Unity) __scrt_common_main_seh
0x00007ff829597604 (KERNEL32) BaseThreadInitThunk
0x00007ff82b2626a1 (ntdll) RtlUserThreadStart

Device not detected on unity

When running the depthai URP project I am getting no complier errors but the Oak device manager isn't picking up any devices. When checking the connected usb devices through system information the movidius chip shows up as connected to one the USB hubs.

I am using the Oak D Pro W

here is the error that I get when I open the hamburger menu to see if the oak device is connected:
DllNotFoundException: depthai-unity assembly: type: member:(null)
OAKForUnity.UIMenuManager.CheckForDevice () (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:310)
OAKForUnity.UIMenuManager.CheckForDeviceWorker () (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:319)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at :0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at :0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at :0)
System.Threading.ThreadHelper.ThreadStart () (at :0)
UnityEngine.<>c:b__0_0(Object, UnhandledExceptionEventArgs)
OAKForUnity.UIMenuManager:GetAllDevices()
OAKForUnity.UIMenuManager:CheckForDevice() (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:310)
OAKForUnity.UIMenuManager:CheckForDeviceWorker() (at Assets/Plugins/OAKForUnity/Scripts/Playground/UIMenuManager.cs:319)
System.Threading.ThreadHelper:ThreadStart()

Enable auto focus.

How can I enable auto focus?My device is OAK-D-Lite,the device suport auto focus.

Roadmap

Why?

Sharing the roadmap with everyone is always good for transparency and best way to drive the development in order to bring the most value in each step.

What?

All feedback is more than welcome !
And we'd love to know more about you and get some insights:

  • Main platform are you using? (MacOS, Win, Linux)
  • Could you explain bit more about your use case? What are you looking to build with the Unity plugin?
  • What part of the Unity plugin you find most interesting? (OAK for Creators, OAK for Developers, OAK for CV/AI)
  • Do you have experience with OAK API/SDK? What platform are you using the most? (C/C++ , Python)

Features and Roadmap:

v1.0.0 Initial Release to AssetStore (free):

  • No code approach. Just drag and drop some prefabs. Bullet-proof.
  • Access to OAK device streams:
    • RGB and depth (point cloud viz currently ongoing dev).
      • About point cloud: Add support for external libraries: PCL, ... and VFX integration.
    • Access to IMU if available and retrieve system information.
    • Record and Replay capability.
  • OAK Device Manager and multiple OAK devices support.
  • OAK For Unity Creators: High-Level API - Unlock “Myriad” applications with predefined and ready-to-use pretrained models (with depth support if you run OAK-D family):
    • Face Detector, 3D Head Pose Estimation, Face emotion, Body Pose (MoveNet), Hand Tracking and Gesture recognition (Blaze Hands), Object detector (Tiny Yolo v3/4/5 and MobileNet SSD). DeepLabv3 segmentation. Background removal, Depth (only OAK-D family) - point cloud visualization
    • Multiple camera demo.
    • Example how to integrate your own pipeline
    • Integration with some paid assets (demos)
  • OAK For CV/AI/Robotics: Unity Virtual OAK Camera

Version 1.0 is just the top of the iceberg. Foundations to build applications on top. Beta testing along the path to get v1.0 ready for assetstore.

Some topics for next versions (big blocks without much detail)

  • More complex demos on top of pretrained models (see list below)
  • Send unity virtual camera images to OAK pipeline.

Do you miss some models / use cases / integration with some specific paid asset? Please let us know.

  • Android support. Integration with AR.
  • End-to-end workflows for synthetic dataset generation, training and deploy.
  • Integration with Unity Robotics Hub (ROS) / SystemGraph / SensorSDK. Publish to ROS.
  • Integration with Unity Simulation and Unity Simulation Pro.
  • Intergration with Unity ML-Agents.
  • Define custom pipelines inside Unity (visual tool).
  • Implement partial C# wrapper

How?

We're opening beta testing on the repo. The plan is start delivering all the features gradually following initial order and always covering full feature (unity plugin lib + unity project/demos) and for all platforms (Win, Mac and Linux)

Following features (v1.0) are ready:

  • Device Manager
  • Demo menu scene
  • Demos:
  • Device streams (rgb, depth), Point cloud visualization using VFX
  • Object detector demo
  • Face detector demo
  • Body pose demo
  • Head pose demo
  • Face emotion demo
  • Hand tracking demo

Please tell us about your project !

More resources:
unity forums: https://forum.unity.com/threads/oak-for-unity-spatial-ai-meets-the-power-of-unity.1205764/
youtube unity plugin playlist: https://youtu.be/CSFOZLBV2RA?list=PLFzqMMJPSNSbsHp7QeJpOHrZu_1BAdDms

.NET Framework/.NET Core Support

Hello, I am considering using OAK-D POE cameras for an application a .NET 5.0 Windows Forms app would need to read frames/depth data from OAK D cameras.

My question is, Is there any wrapper/Library available that could help me read image/depth information in C#, If this is possible, Any sample that would help achieve this would be greatly appreciated.

How can I build this project within or without depthai-core?

build Fail

reproduce:

git clone  https://github.com/luxonis/depthai-unity.git
cd depthai-unity
git submodule update --init --recursive
cmake -G"Visual Studio 17 2022" -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'  -DHUNTER_STATUS_DEBUG=ON -DHUNTER_TLS_VERIFY=OFF

output

-- [hunter *** DEBUG *** 2024-01-15T17:25:15] nlohmann_json versions available: [2.1.1-p0;2.1.1-p1;3.0.0;3.0.1;3.1.0;3.1.1;3.1.2;3.2.0;3.3.0;3.4.0;3.5.0;3.6.0;3.6.1;3.7.0;3.7.1;3.7.2;3.7.3;3.8.0]
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Package 'nlohmann_json' CONFIGURATION_TYPES: Release;Debug
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Package 'nlohmann_json' is cacheable: YES
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Install to: C:/.hunter/_Base/cb0ea1f/eb87dbf/900ca43/Install
-- [hunter] NLOHMANN_JSON_ROOT: C:/.hunter/_Base/cb0ea1f/eb87dbf/900ca43/Install (ver.: 3.9.1)
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Locking directory: C:/.hunter/_Base/cb0ea1f/eb87dbf/900ca43
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Lock done
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Already locked: C:/.hunter/_Base/cb0ea1f/eb87dbf/900ca43
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Locking directory: C:/.hunter/_Base/Download/nlohmann_json/3.9.1/f8a20a7
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Lock done
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Package 'nlohmann_json' default arguments: 'JSON_BuildTests=OFF'
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Add extra CMake args: 'JSON_BuildTests' = 'OFF'
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Locking directory: C:/.hunter/_Base/Cache
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Lock done
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Using environment variable USERPROFILE
-- [hunter *** DEBUG *** 2024-01-15T17:25:15] Downloading DONE metafile (try #0 of 10):
-- [hunter *** DEBUG *** 2024-01-15T17:25:15]   https://raw.githubusercontent.com/cpp-pm/hunter-cache/master/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:15]   -> C:/.hunter/_Base/Cache/meta/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:17] Download error ("Couldn't connect to server")
-- [hunter *** DEBUG *** 2024-01-15T17:25:17] Downloading DONE metafile (try #1 of 10):
-- [hunter *** DEBUG *** 2024-01-15T17:25:17]   https://raw.githubusercontent.com/cpp-pm/hunter-cache/master/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:17]   -> C:/.hunter/_Base/Cache/meta/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:19] Download error ("Couldn't connect to server")
-- [hunter *** DEBUG *** 2024-01-15T17:25:19] Downloading DONE metafile (try #2 of 10):
-- [hunter *** DEBUG *** 2024-01-15T17:25:19]   https://raw.githubusercontent.com/cpp-pm/hunter-cache/master/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:19]   -> C:/.hunter/_Base/Cache/meta/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:19] Retry after 5 seconds (attempt #2) ...
-- [hunter *** DEBUG *** 2024-01-15T17:25:27] Download error ("Couldn't connect to server")
-- [hunter *** DEBUG *** 2024-01-15T17:25:27] Downloading DONE metafile (try #3 of 10):
-- [hunter *** DEBUG *** 2024-01-15T17:25:27]   https://raw.githubusercontent.com/cpp-pm/hunter-cache/master/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:27]   -> C:/.hunter/_Base/Cache/meta/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE
-- [hunter *** DEBUG *** 2024-01-15T17:25:27] Retry after 5 seconds (attempt #3) ...

from first line, I see nlohmann_json 3.9.1 is not available in this Hunter Gate:

-- [hunter *** DEBUG *** 2024-01-15T17:25:15] nlohmann_json versions available: [2.1.1-p0;2.1.1-p1;3.0.0;3.0.1;3.1.0;3.1.1;3.1.2;3.2.0;3.3.0;3.4.0;3.5.0;3.6.0;3.6.1;3.7.0;3.7.1;3.7.2;3.7.3;3.8.0]

if I Update the version of nlohmann_json in depthai-core\cmake\Hunter\config.cmake with

hunter_config(
    nlohmann_json
    VERSION "3.8.0"
    URL "https://github.com/nlohmann/json/archive/v3.8.0.tar.gz"
    SHA1 "70a16819777672d3771a2754eccee95e4249b3b4"
)

build again, get this:

CMake Deprecation Warning at C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_lock_directory.cmake:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_make_directory.cmake:7 (include)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_save_to_cache.cmake:8 (include)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_download.cmake:26 (include)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/projects/nlohmann_json/hunter.cmake:6 (include)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_add_package.cmake:62 (include)
  depthai-core/cmake/depthaiDependencies.cmake:11 (hunter_add_package)
  depthai-core/CMakeLists.txt:167 (include)



[hunter ** FATAL ERROR **] 3.8.0 already used in 'hunter.cmake'.
[hunter ** FATAL ERROR **]  Please specify another version in hunter_config(nlohmann_json).
[hunter ** FATAL ERROR **] [Directory:C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/projects/nlohmann_json]

------------------------------ ERROR -----------------------------
    https://hunter.readthedocs.io/en/latest/reference/errors/error.incorrect.input.data.html
------------------------------------------------------------------

CMake Error at C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_user_error.cmake:7 (hunter_fatal_error)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_add_version.cmake:58 (hunter_user_error)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/projects/nlohmann_json/hunter.cmake:151 (hunter_add_version)
  C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/modules/hunter_add_package.cmake:62 (include)
  depthai-core/cmake/depthaiDependencies.cmake:11 (hunter_add_package)
  depthai-core/CMakeLists.txt:167 (include)


-- Configuring incomplete, errors occurred!

change any version for nlohmann_json will not Fix This.

[hunter ** FATAL ERROR **] 3.8.0 already used in 'hunter.cmake'.
[hunter ** FATAL ERROR **]  Please specify another version in hunter_config(nlohmann_json).
[hunter ** FATAL ERROR **] [Directory:C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Unpacked/cmake/projects/nlohmann_json]

Please Help me.

  • System: Windows 11
  • Microsoft Visual Studio Community 2022
  • CMake version: 3.28.1

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.