3D model production of Higashiyama Zoo and Botanical Garden by photogrammetry

2020年6月

We took thousands of photos of Higashiyama Zoo and Botanical Garden (Nagoya, Aichi, Japan) with a handheld camera from a general passage and produced a 3D model of the animal house by photogrammetry. This is a joint work with Kawaguchi Laboratory , Faculty of Engineering, Graduate School of Engineering, Nagoya University.

Photogrammetry is a useful method for creating 3D models of existing buildings and spaces, although it has many constraints such as selection of appropriate objects and places, shooting conditions, software processing performance, and weight reduction of model data. The 3D model archive of historical buildings and archeological materials, including the game industry and construction industry, are also attracting attention in the academic and educational fields.

Oculus Platform APIをコールバックからTaskへ変換する

2020年6月

はじめに

Oculus Storeからアプリを配布する時はOculus Platform APIが必須になっています。
そのOculus Platform APIは結果をコールバックで返すので処理が冗長になってしまいますが簡単にTask化できたので紹介します。

開発環境

  • System.Threading.Tasksを扱える設定およびバージョンのUnity
    • Unity2017 + Experimental (.NET 4.6 Equivalent)
    • Unity2018 + .NET 4.x Equivalent
    • Unity2019以上
  • Oculus Integration v1.41.0以上

コールバックの場合

以下はエンタイトルメントチェックのベストプラクティスのサンプルコードです。Oculus Platform APIはIsUserEntitledToApplication()のようにOnComplete()で結果が返ってくるので同様の呼び出しが続くとコールバック地獄になって処理の流れが分かりにくくなります。

using UnityEngine;
using Oculus.Platform;
public class AppEntitlementCheck: MonoBehaviour {
  void Awake ()
  {
    try
    {
      Core.AsyncInitialize();
      Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCallback); // ここがコールバック
    }
    catch(UnityException e)
    {
      Debug.LogError("Platform failed to initialize due to exception.");
      Debug.LogException(e);
      // Immediately quit the application.
      UnityEngine.Application.Quit();
    }
  }
  void EntitlementCallback (Message msg)
  {
    if (msg.IsError)
    {
      Debug.LogError("You are NOT entitled to use this app.");
      UnityEngine.Application.Quit();
    }
    else
    {
      Debug.Log("You are entitled to use this app.");
    }
  }
}

Taskへ変換する

スクリプティング定義シンボルにOVR_PLATFORM_ASYNC_MESSAGESを追加します。
image.png

するとTaskを返すGen()メソッドがOculus.Platform.Requestクラスで使えるようになるので以下のように書く事ができます。

private async void Awake()
{
    try
    {
        if (!Core.Initialized())
        {
            var initialized = await Core.AsyncInitialize().Gen(); // ここをTask化
            if (initialized.IsError)
            {
                Debug.Log($"failed initialize: {initialized.GetError().Message}");
                return;
            }
        }
        var entitlements = await Entitlements.IsUserEntitledToApplication().Gen(); // ここをTask化
        if (entitlements.IsError)
        {
            Debug.Log($"failed entitlement: {entitlements.GetError().Message}");
            return;
        }
        var user = await Users.GetLoggedInUser().Gen(); // ここをTask化
        if (user.IsError)
        {
            Debug.Log($"failed get user: {user.GetError().Message}");
            return;
        }
        Debug.Log($"{user.Data.ID}, {user.Data.OculusID}");
    }
    catch (UnityException e)
    {
        Debug.LogException(e);
        Application.Quit();
    }
}

更にUniTaskと組み合わせるとタイムアウトも簡単に扱えます。

var initialized = await Core.AsyncInitialize().Gen().AsUniTask().Timeout(TimeSpan.FromSeconds(10));

1つ残念なのはGen()が返すTaskTaskCompletionSourceで作られてprivateフィールドにあるのですがTrySetCanceled()を呼ぶメソッドが用意されていないのでCancellationTokenでキャンセルできない事です。どうしてもキャンセルしたい場合はSDKに多少の変更が必要です。

Developed software for "TSUNAGATE", a platform for IoT construction sites

2020年6月

Kadinche has developed software for “TSUNAGATE”, a platform for IoT of construction sites at Takenaka Corporation.
“TSUNAGATE” can connect various ICT tools to a cloud management system for centralized management by building a network (wireless LAN) environment at the construction site via a temporary distribution board that enables Internet connection. It is a platform realized by the cooperation of Takenaka Corporation’s original IoT distribution board and our cloud technology.
Normally, at the construction site, power for construction is supplied by a temporary power line, but by applying “TSUNAGATE” which can communicate using the temporary power line, ICT tools such as network cameras and digital signage can be applied. This eliminates the need for separate communication wiring. It also enables the realization of IoT at the construction site, such as centralized management of those ICT tools, remote control of lighting, and collection of sensor information.
We have developed “TSUNAGATE” for Cloud and software.
“TSUNAGATE CLOUD” “TSUNAGATE CLOUD” is a system that monitors and controls the functions installed in “TSUNAGATE BOX” located at the construction site.
Since it is built on the cloud, “TSUNAGATE BOX” on the construction site can be centrally managed from a remote location via a web browser.
We developed “TSUNAGATE CLOUD” by utilizing AWS IoT.

Other examples of using “TUNAGATE” (“TSUNAGATE VIEW”)
“TUNAGATE VIEW” uses power line communication (PLC), installs a camera on the ceiling and connects it to a temporary light, and the images around 360 degrees are displayed. It is a system that acquires and saves in “TSUNAGATE CLOUD”. By installing multiple units on the construction site, we have realized a “virtual site patrol” that allows you to change the viewpoint and the date and time to look around the site.
At our company, we developed software such as cloud development by utilizing software development utilizing a 360 degree camera, virtual tour, and “PanoPlazaTour”.
We will continue to combine 360-degree camera solutions and IoT technology to support the efficiency of site/construction management in the digital twin era.