1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【更新中】Xtion 2を購入したのでmacOSで動作させるまでを記録する。

Last updated at Posted at 2017-10-13

知っている人、誰か助けてください!

Xtion 2

革新的な可能性を探る開発者向けソリューション「Xtion 2」

P_setting_fff_1_90_end_500.jpg

なぜこれを選んだのか?

知識ゼロの中、これが一番小さそうで、よくわからんがOpenNIと互換性があるらしので、OpenNIは絶対使いそうな雰囲気があったのでこれにしました。

でもmacOSじゃ動かない。

どうやらWindowsとLinuxにしか対応してないらしい。

なんとかするしかなかろう。

ハードウエアを動かすまでの挑戦が始まる。

ハードが動かないならドライバーを作る!ってことでこの記事を読みました。

このコマンドでUSBに接続され認識されていることはわかった。
system_profiler SPUSBDataType

USB:

    USB 3.0 Bus:

      Host Controller Driver: AppleUSBXHCIWPT
      PCI Device ID: 0x9cb1 
      PCI Revision ID: 0x0003 
      PCI Vendor ID: 0x8086 

        4-Port USB 3.0 Hub:

          Product ID: 0x0401
          Vendor ID: 0x0bda  (Realtek Semiconductor Corp.)
          Version: 1.03
          Speed: Up to 5 Gb/sec
          Manufacturer: Generic
          Location ID: 0x14400000 / 22
          Current Available (mA): 900
          Current Required (mA): 0
          Extra Operating Current (mA): 0

            ASUS Xtion2 Depth:

              Product ID: 0x182c
              Vendor ID: 0x0b05  (ASUSTek Computer Inc.)
              Version: 0.15
              Serial Number: 200901010001
              Speed: Up to 5 Gb/sec
              Manufacturer: Generic
              Location ID: 0x14420000 / 24
              Current Available (mA): 900
              Current Required (mA): 800
              Extra Operating Current (mA): 0

            ASUS Xtion2 RGB:

              Product ID: 0x182d
              Vendor ID: 0x0b05  (ASUSTek Computer Inc.)
              Version: 0.05
              Serial Number: 0x0001
              Speed: Up to 5 Gb/sec
              Manufacturer: Generic
              Location ID: 0x14410000 / 23
              Current Available (mA): 900
              Current Required (mA): 800
              Extra Operating Current (mA): 0

ドライバの前にOpenNI2をもっとよく見てみる。

この記事を参考にやってみることにした。

OpenNI2はここから入手
https://github.com/occipital/OpenNI2

After initialization:

SimpleViewer: Device open failed:
	DeviceOpen using default: no devices found

エラーから

OniStatus Context::deviceOpen(const char* uri, const char* mode, OniDeviceHandle* pDevice)
{
	oni::implementation::Device* pMyDevice = NULL;

	const char* deviceURI = uri;
	if (xnOSStrLen(m_overrideDevice) > 0)
		deviceURI = m_overrideDevice;

	xnLogVerbose(XN_MASK_ONI_CONTEXT, "Trying to open device by URI '%s'", deviceURI == NULL ? "(NULL)" : deviceURI);

	m_cs.Lock();

	if (deviceURI == NULL)
	{
		// Default
		if (m_devices.Size() == 0)
		{
			m_errorLogger.Append("DeviceOpen using default: no devices found");
			xnLogError(XN_MASK_ONI_CONTEXT, "Can't open default device - none found");
			m_cs.Unlock();
			return ONI_STATUS_ERROR;
		}

		pMyDevice = *m_devices.Begin();
	}

ここが悪いことがわかった。
デバイスを認識できてないようだ。

ドライバーについて勉強

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?