質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

解決済

1回答

2743閲覧

MediapipeUnityPluginの導入 ビルドできない

Midget2

総合スコア34

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

0クリップ

投稿2022/05/22 12:45

編集2022/05/22 14:11

MediapipeUnityPluginの導入で行き詰まってしまいました

実現したいこと

MediapipeUnityPluginを使ってハンドトラッキングをUnity上で動作させたいと考えています
ゆくゆくは iOSの上でハンドトラッキングを動作させたいです。

前提

ターミナルからMediapipeのサンプルであるハンドトラッキングは実行する事ができました

試したこと

①MediaPipeUnityPluginをクローン

git clone https://github.com/homuler/MediaPipeUnityPlugin.git

②このページを参考にインストールしました
https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide
※初めの
This repository does not contain required libraries (e.g. libmediapipe_c.so, Google.Protobuf.dll, etc), so you need to build them first.
これはどう解決したらよいかわかっていません

③ビルドコマンドを実行しました

python build.py build --desktop cpu --android arm64 --ios arm64 -vv

以下のエラーが出ました

発生している問題・エラーメッセージ

ERROR: /private/var/tmp/_bazel_user-name/46416640a65851106d7df279baa01a04/external/com_google_mediapipe/mediapipe/util/BUILD:146:11: Compiling mediapipe/util/annotation_renderer.cc failed: (Aborted): wrapped_clang_pp failed: error executing command (cd /private/var/tmp/_bazel_user-name/46416640a65851106d7df279baa01a04/sandbox/darwin-sandbox/1349/execroot/mediapipe_api && \ exec env - \ APPLE_SDK_PLATFORM=MacOSX \ APPLE_SDK_VERSION_OVERRIDE=12.3 \ PATH='/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/user-name/bin' \ XCODE_VERSION_OVERRIDE=13.4.0.13F17a \ ZERO_AR_DATE=1 \ external/local_config_cc/wrapped_clang_pp '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG '-DNS_BLOCK_ASSERTIONS=1' '-std=c++11' 'DEBUG_PREFIX_MAP_PWD=.' -iquote external/com_google_mediapipe -iquote bazel-out/darwin-opt/bin/external/com_google_mediapipe -iquote external/com_google_protobuf -iquote bazel-out/darwin-opt/bin/external/com_google_protobuf -iquote external/zlib -iquote bazel-out/darwin-opt/bin/external/zlib -iquote external/com_github_glog_glog -iquote bazel-out/darwin-opt/bin/external/com_github_glog_glog -iquote external/com_github_gflags_gflags -iquote bazel-out/darwin-opt/bin/external/com_github_gflags_gflags -iquote external/com_google_absl -iquote bazel-out/darwin-opt/bin/external/com_google_absl -iquote external/macos_opencv -iquote bazel-out/darwin-opt/bin/external/macos_opencv -Ibazel-out/darwin-opt/bin/external/com_github_glog_glog/_virtual_includes/default_glog_headers -Ibazel-out/darwin-opt/bin/external/com_github_gflags_gflags/_virtual_includes/gflags -isystem external/com_google_protobuf/src -isystem bazel-out/darwin-opt/bin/external/com_google_protobuf/src -isystem external/zlib -isystem bazel-out/darwin-opt/bin/external/zlib -isystem external/macos_opencv/opt/opencv@3/include -isystem bazel-out/darwin-opt/bin/external/macos_opencv/opt/opencv@3/include -MD -MF bazel-out/darwin-opt/bin/external/com_google_mediapipe/mediapipe/util/_objs/annotation_renderer/annotation_renderer.d '-DMEDIAPIPE_DISABLE_GPU=1' '-frandom-seed=bazel-out/darwin-opt/bin/external/com_google_mediapipe/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o' -isysroot __BAZEL_XCODE_SDKROOT__ -F__BAZEL_XCODE_SDKROOT__/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR__/Platforms/MacOSX.platform/Developer/Library/Frameworks '-mmacosx-version-min=12.3' -no-canonical-prefixes -pthread -w '-std=c++17' -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -target x86_64-apple-macosx -c external/com_google_mediapipe/mediapipe/util/annotation_renderer.cc -o bazel-out/darwin-opt/bin/external/com_google_mediapipe/mediapipe/util/_objs/annotation_renderer/annotation_renderer.o) # Configuration: 052e0b41cc26c8db217a0262e08c4196e8fdbce5be4f54e78fc17ef208f5b008 # Execution platform: @local_execution_config_platform//:platform Use --sandbox_debug to see verbose messages from the sandbox In file included from external/com_google_mediapipe/mediapipe/util/annotation_renderer.cc:15: In file included from external/com_google_mediapipe/mediapipe/util/annotation_renderer.h:20: external/com_google_mediapipe/mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: 'opencv2/core/version.hpp' file not found #include <opencv2/core/version.hpp> ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Error in child process '/usr/bin/xcrun'. 1 Target //mediapipe_api:mediapipe_desktop failed to build INFO: Elapsed time: 115.761s, Critical Path: 96.05s INFO: 1144 processes: 143 internal, 1001 darwin-sandbox. FAILED: Build did NOT complete successfully

ビルドを成功させ,ハンドトラッキングを実行するにはどのようにしたらよろしいでしょうか?

補足情報(FW/ツールのバージョンなど)

Intel Mac
MediaPipeUnityPlugin : v0.10.0
Unity : 2021.3.3f1
MediaPipe : v0.8.9
Python 3.9.10
bazel 5.0.0
OpenCV 4.5.5

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

y_waiwai

2022/05/22 12:58

エラーが出たなら、エラーメッセージを提示しましょう エラーメッセージは、よけいな省略翻訳しないで出たそのママをコピペで提示してください
bboydaisuke

2022/05/22 13:08 編集

> This repository does not contain required libraries (e.g. libmediapipe_c.so, Google.Protobuf.dll, etc), so you need to build them first. これがわからなくて無視したのなら、使えなくて当然です。そのライブラリはさらに依存するライブラリがあるので、それらを先に準備しなければならない、と言っています。その準備方法は何も書いていないので、「それくらいはわかっている人」が対象の利用者なのでしょうね。
bboydaisuke

2022/05/22 16:45

> external/com_google_mediapipe/mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: 'opencv2/core/version.hpp' file not found > #include <opencv2/core/version.hpp> > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 error generated. 何が悪いかちゃんと書いてありますよ。
Midget2

2022/05/24 10:08

すみません なかなかエラーの意味がわからず成功しません
guest

回答1

0

自己解決

ビルドの時にオプションをつけると回避することができました
python build.py build --desktop cpu --opencv cmake -vv

投稿2022/07/02 00:41

Midget2

総合スコア34

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問