by Dr Mike
Posted on January 2018
My previous post made it clear what I think about the chances of Orbbec being the crown prince of Kinect. The system architecture, especially of Persee, is full of promise. Before 2017 ended, we’ve got the long-promised support for Unity in Astra SDK 2.0.7 Beta release. My best Christmas present! Finally I’ll be able to dump (the good old) C++ and go for the high speed app development I’m famous for.
Given the fact that Orbbec's Unity bundle doesn't come with any documentation nor does the Orbbec community provide any entry level tutorials (“I just got my Persee today, now what?”), I thought it would be worthwhile bringing some clarity to the first steps. Hopefully this will save some hours and headaches. (Honestly, I spent too long figuring this out from zero in case of Persee.)
The case of Astra/Astra Pro is rather simple. Once you’ve unboxed the sensor you can already proceed with the software:
Everything runs just like that. Well done Orbbec! Well, it isn’t pretty, but has all the necessary functionality that you’d need to get started with coding:
By the way: If you have any need to elevate the sensor above your desk, the box works perfectly!
So it is that simple with Astra and Astra Pro. But Persee is a bit trickier. Basically, what you get inside the box is:
What you're going to need is:
Batter models are CR2016, CR2025 and even CR2032 tested and proven to fit, although the last one is tricky to put inside. Basically any battery used in digital watches works. You can use a ruler, a coin or a scissors’ tip to open the backside of the remote. Punch it in the same way as in the picture.
There isn’t any power button, if that’s what you’re looking for. You can just switch power on from the switch on your socket or extension cable.
Once the power is on and you’re watching closely, the infrared light turns on for a second or so. If it doesn’t, your device may have been damaged during shipping. In that case: tough luck.
But how to get it up and running, run the sample project and turn the sample to your own demo scene? Here we go.
As Persee is indeed a mini Android computer, comparable to a smartphone except equipped with Astra Pro 3D sensor, you can simply plug in the power cable and connect the HDMI to your display. Here, I’m using my old 42’’ TV (which is pretty much the minimum size for any decent public space installation I used to make for Kinect).
After a few seconds you should be seeing a familiar Android home screen on your display. Da-daa! If you’re using a TV screen like here you may have to select the input source on it using the TV’s remote.
So, now if you’ve ever developed any Android apps for smartphones or tablets, the next things are pretty obvious. You’d need to build an .apk file from the Unity test scene and get it running on the device. Unfortunately, at this moment, there isn’t any USB debugging options available for Persee, so what my development process looks like is actually this:
This way I can skip several manual steps of fumbling with USB sticks and the pre-installed ApkInstaller app and most of other manual steps. But indeed, I need two sensor devices. The only difference between the two is the minicomputer part under Persee. The sensor itself is exactly the same piece of hardware.
First, you can connect Persee to your WiFi, which is exactly the same as using any smartphone or tablet, except text input is, hmmmm, slow. Depending on your preference, you could connect a USB mouse to Persee and keep clicking through the characters of your WiFi password. I prefer this way as there are some limitations navigating some applications (including Dropbox) with just the remote control. Another option (I’m just assuming) is to use a touch screen as the display which might be the smoothest way to get around inside Persee.
Then, let’s enable the Developer Options of the device. It’s the classic Android trick done in Settings.
Go to About Device.
Scroll down to Build Number and keep pressing it until the notification tells you have activated the developer mode. You can try press it more to see the message below.
You can then install Dropbox. Go to main menu, select Google Play and find Dropbox app. Also, you may have to update the Google Play app before you can install anything and log in using a Google account. As I am a heavy user of Dropbox, I created separate accounts (Google and Dropbox) so I can keep things simple, isolated and I will save time in syncing files. (And of course, the development PC should have that Dropbox app installed also.)
Now, once Dropbox is installed, you can go back to your PC to prepare the .apk file. The scene is build-ready, so all you’d need to do is to tamper with a few settings. First, go to Build Settings.
Check if you need to install the Android support. Unity does good job in guiding through that process and if that doesn’t do, there’s plenty enough help around the internet. Once you have Android build capability, set the following:
Development build is handy because you don’t need to do the app signing process now that we’re just trying to test thing out here.
Then open Player Settings as there are a couple of things prohibiting us to get the app running on Persee. Surprisingly, you don’t need to change API levels (“Gingerbread” API level 9 is just fine) or anything. Just make sure that you have:
Then, if not there already, add TestScene to the list of Scenes in Build and click Build.
Select your Dropbox folder as the build target, so you won’t need any manual steps in subsequent builds. Name your .apk file and click Save.
After Dropbox has synced the file, you can go back to Persee. In your Dropbox app you can now see the .apk file somewhere in the folder structure.
Download it, install it, and grant all permission.
The app opens automatically. There you go!
It took quite a few steps to set up the development process, but after this it gets pretty easy. I would still highlight that it is totally worth the money to have Astra Pro for development even if your main target is Persee. USB debugging is simply the fastest way to go. I’m just hoping it is coming to Persee soon in some future release of Astra SDK.
EDIT 3/2018: The above worked perfectly for the first release of the SDK in December 2017. Later I had problems with February 2018 version as I couldn't get the app installed on Persee no matter what. Fixed by choosing Install Location: Force Internal in the Player Settings.
EDIT 7/2018: The latest version 2.0.9 beta may require also the API level to be specified. Just set Minimum API Level: Android 6.0. 'Marshmallow' (API level 23) in the Player Settings. Good to go!
The next article will demonstrate easy modifications to the test scene and some basic code level stuff.
© 2014-2018 Improventions. All rights reserved.
Created by MGWalton
Powered by coconuts