[[Tutorial]]

#contents

* Control of an agent by Kinect [#s03fafab]

※This tutorial is valid for SIGVerse 2.2.0 or later.
※This tutorial requires Windows 8.1 and Kinect for Windows SDK 2.0. 

This tutorial introduces a method to control a human avatar using KinectV2 sensor

------
If you questions after reading this page: Please feel free to email at:
{jain@nii.ac.jp, inamura@nii.ac.jp}
-------


** Kinect for Windows SDK 2.0 [#qd9610ff]

-[[You can download SDK from here>http://www.microsoft.com/en-us/download/details.aspx?id=44561]]

** Set up at client side on Windows 8.1 [#hc45c4cb]

A plug-in module for the SIGViewer receives motion data from Kinect, calculates Quaternion of each joint, and send the data to avatar controller on the server.

*** KinectV2 SIGService [#y4ebbdcc]

The folder that contains the kinectV2_2013.sig file along with required DLLs is attached here:

#ref(KinectV2SIG.rar)

You can also build the SIGService directly from the source as shown below:


*** Building the KinectV2 SIGService from source [#nefbf579]

For building the SIGService, Visual C++ 2013 Express Edition has been used.
The Source is uploaded on GitHub which you can clone on your disk.

    $ git clone https://github.com/SIGVerse/Client.git
    $ cd Plugin/KinectV2
    
The instructions to build are given on the Github page 
https://github.com/SIGVerse/Client/tree/master/Plugin/KinectV2

** Set up at server side [#vbb0fd2f]

A controller receives joint angle data; controls the avatar's joints.

*** Controller [#vc7899c9]

Create a controller file kinectController.cpp as follows:

#gist(raghavendrajain/bbe0100ecaa008a3951b)

This controller receives messages from Kinect; rotates each joint of an avatar.

Compile with the following command.

 $ ./sigmake.sh kinectController.cpp

*** World file [#kcdef075]

Create world file kinectWorld.xml as follows:

#gist(raghavendrajain/b5fb732e835db76eabcc)

Just an avatar will be appeared in this world. This sample controls only one human avatar by the Kinect.

** Execution [#s58961b9]

*** SIGVerse server [#fe0a59dc]

Start the SIGVerse server
 $ sigserver.sh -w ./kinectWorld.xml

Next, run the SIGViewer and connect to the sigserver. You can see an avatar is standing.

*** Registration of user interface plug-in [#i3bdc209]

Click the [Service]-->[Add] menu on the top-left of the SIGViewer window bar.

#ref(SIGNi_1.PNG)

You then can see the following window.
Click the Add button to registrate SIGNiUserTracker.sig

#ref(./SIGNi_2.PNG,80%)

After the registration of SIGNiUserTracker.sig to the Service list, click the OK button to close the window.

Next, click the [Service]-->[Start] menu; then select the kinectV2_2013.sig

As written above, The folder that contains the kinectV2_2013.sig file along with required DLLs is attached here:

#ref(KinectV2SIG.rar)

If the Kinect's depth map window is appeared and you see the following message on the server, it means the application is successfully started.
 [SYS]  Service: "SIGKINECT" is available

Click the "START" button to start the simulation.

You can control the human avatar with the Kinect.

#ref(./SIGNi_3.JPG,25%)




#highlight(end)

Front page   New List of pages Search Recent changes   Help   RSS of recent changes