[[Tutorial]]




#contents

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

* Control of an agent by Kinect [#s03fafab]

※This tutorial requires Windows 8.1 and Kinect for Windows SDK 2.0. 

※This tutorial is valid for SIGVerse 2.2.0 or later.

※This tutorial requires that OpenCV be installed on your PC.

※ To build SIGService for KinectV2 from the source code, you will require OpenNI to be setup in your PC.

------
If you questions after reading this page: Please feel free to email at:
If you have any questions after reading this page: Please feel free to email at:
sigverse-users@googlegroups.com
-------


** 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.

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

For building the SIGService, Visual C++ 2013 Express Edition has been used.
However, you can use  Visual C++ 2010 Express Edition as well.

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

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   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes