Up:[[Tutorial]]

----
#contents

*** Writing SIGVerse Controller with Python [#e6e29ac9]

-[[Embedding Python Interpreter]]
-[[The first application using Python]]
-[[Error Handling]]
-[[Converting data from C++ to Python and vice versa]]
-[[Import and use of user defined python modules]]
-[[Computation of Inverse kinematics for 3dof planar robot]]

*** Writing services for Sigverse with Python [#kf19d664]

To write services e.g. controlling objects or avatar using mouse/wii/ joystick, Sigverse offers the utility of SigService. The SigService is written on client side in C++ using Visual Studio and the data between SigService to SigServer and vice-versa is transferred using sockets. I have made an utility to write the main functionality of SigService using Python modules and embed those modules inside C++ code written in Visual Studio.  This gives an advantage since many functionality for human-computer interface e.g. mouse/wii/joystick/speech recognition/text-to-speech etc is already written in Python and just require embedding with SigService socket interface. 

To use such utility, user needs to install and compile boost.python with Visual Studio.

-[[Compiling Boost.Python for Python in Visual Studio]]

The following tutorial creates a SigService that sends mouse movement to Sigserver. The mouse movement is captured using GUI and functions created with PyGame. The relative positions of left mouse clicks are captured and sent to the Sigserver. The controller codes receives those values of relative positions and tool is moved. The moving tool hits the target object.

-[[SigService to capture relative positions of mouse movements and move tool]]

*** The SIGServices already developed. Easy to use!! [#y05bfb49]

The following SIGServices are developed using Python. You can use them with your project very easily. 
You don't need to have boost.python installed and compiled in Visual Studio in order to use them. 
-[[SIGService to control an object using Wii controller.]] Update! 2014-Jan-15
-[[SIGService to control an object using Mouse Movements.]] Update! 2014-Jan-20
-[[SIGService to control a robot using Joystick.]] Update! 2014-Jan-20

But if you need to change the SIGService itself, you shall need to have it installed and compiled with Visual Studio. 




[[Tutorial]]

This page is managed by Raghvendra Jain. If you have any questions regarding these tutorials and need some help in using Sigverse with Python, please feel free to contact him at his email:

jain[At]nii[dot]ac[dot]jp



#counter

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes