Table of Contents
- Credits
- License
- About Virtual Sensei Lite™
- Requirements
- First installation
- Update
- Activation
- Recording data
- Playing recorded data
- Plot tools: zoom, pan, scale
- Cropping mocap files
- Exporting results
- Preferences
- Usage examples
- Troubleshooting
- To do
1. Creditstop
Virtual Sensei™ and its Lite version are continuously expanding, thanks to people who contribute for passion or friendship. We would like to acknowledge the contributions of the following individuals:
- Ettore Pennestrì, Professor of Applied Mechanics at the University of Rome Tor Vergata, inspirer of this work.
- Pier Paolo Valentini, Professor of Machine Design, Virtual Prototyping ad Simulation of Mechanical Systems at the University of Rome Tor Vergata.
- Andrea Pilia, "Photographer like many others".
- Ivano Cappelli, M.F.A. in Visual Arts, "Pigmentus".
- Michele Terlizzese, J.D. at the University of Rome Tor Vergata.
- Silvia Trichilo, B.S. in Mechanical Engineering at the University of Rome Tor Vergata.
- Andrea Timmi.
2. Licensetop
In this section a short extract of the End User License Agreement (EULA) for the software Virtual Sensei Lite™ is reported. The purpose is to clarify the terms of use of the software. For the full license, please see here.
2. LICENSE 2.1. Under the terms of this agreement, a non-exclusive (FREEWARE) license is granted to the USER on the understanding the AUTHOR retains ALL rights to the SOFTWARE. 2.2. You are free to download and/or use the SOFTWARE only for personal use (not commercial) and only for legal purpose. 2.3. The SOFTWARE may be installed and used by the USER on any number of systems. 2.4. The USER may not modify, adapt, translate, reverse engineer, decompile, disassemble, alter, merge or otherwise mis-use the SOFTWARE. 2.5. The USER may not attempt to discover the source code of the SOFTWARE. 2.6. The USER may not make derivative works based upon the SOFTWARE. 2.7. The USER may re-distribute the SOFTWARE, on the understanding no attempt is made to sell or otherwise personally or financially gain from the distribution of such SOFTWARE. When re-distributed, the SOFTWARE must remain unchanged, including all the files described in 1.2. 2.8. The USER may not "bundle" the SOFTWARE with any product and/or service that has not been developed and/or provided by the AUTHOR. 2.9. The following trademarks are property of the AUTHOR: Virtual Sensei, the Virtual Sensei logo, Virtual Sensei Lite, the Virtual Sensei Lite logo, VSLITE, the VSLITE logo and "Discover your kinetic energy". 2.10 The USER may publish (on the web, in scientific articles or elsewhere) data and results processed using the SOFTWARE (both in graphical or textual form). The only restrictions are: (a) the USER must give credits to the software "Virtual Sensei Lite"; (b) the USER must link to Virtual Sensei Lite webpage when publishing data on the web, adding the following link on EACH PAGE containing the data. The HTML code for this link is: Motions analysis performed using <a title="Virtual Sensei Lite homepage" href="http://www.virtualsensei.it/lite/" target="_blank">Virtual Sensei Lite</a>. THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3. About Virtual Sensei Lite™top
Virtual Sensei Lite™ is a simplified version of the software used to perform some biomechanical instrumented analysis on the athletes of the Italian National Karate team. The purposes of these studies and the goals of the "Pro" version of the software are:
- Evaluation of the kinetic energy levels achieved by the athlete in different techniques.
- Critical review and optimization of the body motions.
- Recording of elite athletes' performances.
- Development of tools for sports club coaches and athletes.
- Prevention of athletes' wear and injuries.
Virtual Sensei Lite™ is the answer to the 4th point of the list, because it is:
- affordable (free software + low cost hardware);
- user-friendly;
- quick to use.
Obviously, this simplicity and cheapness involve some sacrifices: the quality of motion tracking and, therefore, the precision of the results are not extreme. However our philosophy, when developing this tool, was to give a signal, a starting point, something that, thanks to internet, everyone could use and have benefit. This is a work in progress and we expect to continuously improve it in the future, with your feedback and your support too.
4. Requirementstop
First of all, to use Virtual Sensei Lite™ you need:
- A PC with Windows XP SP2/Vista/7. Both 32/64 bit version are ok. Maybe the software can run also on previous OS version, but we don't have PCs to test this. So, let us know your experience.
- A Microsoft Kinect sensor, required to track the athlete's motions. The software can run without it, but you can only replay previously recorded file. See the downloads page for sample mocap files that you can download and open inside Virtual Sensei Lite™.
NOTICE: The Kinect sensor requires its AC adapter in order to power and connect it to the PC.
This cord is shipped in the Kinect stand-alone kit: you can often find this kit bundled with the game "Kinect Adventures!".
However, if you purchased the console Microsoft Xbox 360 S bundled with Kinect, you don't have this accessory, because this new version of the console can power both itself and Kinect.
In this case you have to buy the power cord separately. You can search on Google "Kinect AC power adapter".
5. First installationtop
WARNING: please, DON'T connect the Microsoft Kinect to the PC now.
In order to run Virtual Sensei Lite™ you have to download and install this:
To use the Kinect for motion tracking, you need to install the following modules (the version numbers could be different from the ones in these screenshots):
- Microsoft Visual C++ 2010 Redistributable Package (x86);
- OpenNI for Windows x86 (32-bit);
- PrimeSense NITE for Windows x86 (32-bit);
- SensorKinectXXX-Bin-Win32-vX.X.X.X.msi by Avin2.
Please, respect this order of installation and then restart your PC.
Now you can connect the Microsoft Kinect to the PC. You will see Windows searching the drivers.
NOTICE: if Windows doesn't find the drivers, please see the Troubleshooting section.
Now you are ready to download and install Virtual Sensei Lite™, if you haven't done it yet.
NOTICE: If your browser says the setup file is harmful, don't worry, it's clean: check this analysis on VirusTotal.com.
6. Updatetop
Since version 0.2.1, Virtual Sensei Lite automatically searches for updates on startup. You can also manually search for updates from Help > Check for updates.
If the program finds a newer version, it asks you to update. Click Yes, and it starts downloading the setup file.
When the download is completed, the software closes itself and starts the installation of the latest version.
NOTICE: You can safely avoid to uninstall the previous version of Virtual Sensei Lite, because all the program files (not your recorded mocap files!) are overwritten during setup.
If you are updating from a previous version of Virtual Sensei Lite, probably the following modules are already installed on your pc:
- Microsoft Visual C++ 2008 Redistributable Package (x86).
- Microsoft Visual C++ 2010 Redistributable Package (x86);
It is better to uninstall the previous versions of the following modules. Go to Start > Control panel > Uninstall a program and uninstall:
- OpenNI...
- PrimeSense - NITE...
- PrimeSense Sensor KinectMod...
- Windows Driver Package - PrimeSense (psdrv3)...
Now you have to download the following updated modules:
- OpenNI for Windows x86 (32-bit);
- PrimeSense NITE for Windows x86 (32-bit);
- SensorKinectXXX-Bin-Win32-vX.X.X.X.msi by Avin2.
Please, respect this order of installation and then restart your PC.
Now you can connect the Microsoft Kinect to the PC. You will see Windows searching the drivers.
NOTICE: if Windows doesn't find the drivers, please see the Troubleshooting section.
NOTICE: If your browser says the setup file is harmful, don't worry, it's clean: check this analysis on VirusTotal.com.
7. Activationtop
Since version 0.2.2, Virtual Sensei Lite requires an activation procedure. This is a one-time FREE activation and it was added to avoid you to insert your email address each time you download the setup file.
On startup, the software will ask you a valid email address. Fill the field, click on Send and wait for the progress bar to be filled. Then check your email (also your spam folder if you don't find any message) and copy the product key.
Finally paste the code in the right field and click on OK. Your copy of Virtual Sensei Lite is activated. This serial will remain valid in future versions too.
8. Recording datatop
To record new motion capture (mocap) data, be sure to plug the Kinect both into the PC and into an electrical outlet, using the AC adapter.
The tracking procedure implies some assumptions:
- avoid occlusion by other objects between the user and the sensor;
- ideal distance sensor-user is around 2.5 m;
- suggested sensor height is about 0.6 - 1.8 m off the floor, higher is generally better;
- for better results, user should not wear loose clothing. Long hair may also degrade the quality of the tracking;
- user's body must be completely visible;
- avoid the direct sunlight inside the room.
To start a new recording, follow this procedure:
- in the left column of the software interface, click on Save As to choose the file path and name;
- if the file already exist the software will ask you for a confirmation;
- fill the other fields (athlete's name, technique name, athlete's weight in kg and height in cm);
- be sure to choose the athlete's gender (male/female), otherwise the recording will not start;
- push the Rec button.
Since you could also edit the "Save As" field manually, when you push Rec the software will ask again for a confirmation before overwriting an existing mocap file.
When you click Rec, the software will show the window Virtual Sensei Lite - User Tracker Viewer. It reproduces the scene as viewed by the Microsoft Kinect. At the beginning the scene is totally grey.
NOTICE: if you receive an error message or the recording doesn't start, see the Troubleshooting section here.
Now you can adjust the Kinect tilt orientation, setting the angle in degrees inside the Tilt [deg] field. It is limited to the range -23°/+23°, don't worry if you insert a higher value. Make sure the athlete is entirely visible (from head to feet).
Suggestions:
- avoid modifing the tilt angle during important recordings: joints data will be affected by the change of orientation. Start a new recording after the regulation;
- use the tilt motor with moderation: the gears inside the Kinect are delicate.
When the user moves, the sensor detects him and assigns a color to his silhouette. Normally, for the first detected user the color is blue.
NOTICE: the Kinect sensor can track more than one user at the same time, but Virtual Sensei Lite is programmed to record the data of a single user. We intend to fill this gap in future releases.
To start the actual data recording, the user must perform the calibration procedure. It means assuming the pose shown in the figure below (called Psi-pose) for some seconds. When the calibration is completed, a skeleton composed of a set of lines appears on the coloured silhouette.
Now the program is recording the user's motions.
To stop recording, press the Stop button in the software interface. You can also click on the X on the top right corner of the tracking window, but you have to press Stop anyway to reactivate all the other buttons.
Recorded tracking data are now stored in the ASCII file selected in the "Save as" field. The file also contains the athlete's data (name, height, etc.).
As said, this tracking technology and the software itself are still works in progress. Therefore, there are several issues that the user should know:
- arm tracking is less stable when the arm is close to other body parts, especially the torso;
- leg tracking works better when the user stands with legs separated. Complex or high kicks might cause the tracking to fail;
- if the skeleton is stuck in a faulty pose, returning to a simple pose should help resolve it;
- re-calibrating the skeleton may resolve tracking issues. If you notice a wrong calibration result, restart the recording;
- if a technique requires crossing the limbs, be sure the Kinect sees at least part of each crossing limb. You will find the best way to perform a particular tecnique adopting a trial-and-error approach.
9. Playing recorded datatop
[Watch the video tutorial - Play a mocap file]
Once recorded, tracking data can be processed and shown. There are some sample mocap files that you can download and open inside Virtual Sensei Lite™. Data processing is automatically performed when you open the mocap file. To find the desired mocap file, click on File > Browse in the menu bar or the Browse button in the right column of the interface. In the dialog, choose the file and click Open. The athlete's information should now be visible in the fields of the right column:
Now press File > Open in the menu bar or the Open button. The grey buttons in the right column of the interface will become red and the software will open 2 windows:
- Virtual Sensei Lite - 3D skeleton animation, with the skeleton reproducing the athlete's motions.
- Virtual Sensei Lite - Plots, containing the plots of the total kinetic energy of the entire body, expressed in J, and of the hands/feet speeds, in m/s.
NOTICE: on PCs with old graphics cards you might receive an error message when opening a mocap file or closing Virtual Sensei Lite™. See the Troubleshotting section here for further info
These two windows work as a common player. You have the standard controls in the lower part of the interface:
You can rotate the skeleton clicking on the scene with the right button and dragging. Similarly, you can zoom in/out clicking with both the left and right buttons and dragging:
The remaining controls do the following actions:
- Show plot labels: show/hide the yellow labels near the plot cursors, displaying the current X and Y values.
- Export results: you can export kinetic energy and speed data in both graphical and ASCII format, see below.
- Show joints trails: open a dialog where you can choose which joints trails display or hide. You can also choose the trails length in Edit > Preferences in the menubar (cfr. below).
- Show COM: show/hide the instantaneous center of mass of the athlete's body.
- Loop: restart from the beginning when the player reach the last frame.
- Crop file: allows eliminating those part of the mocap file that are useless. This function is useful because often, just after the calibration, the sensor tracks false data that compromise the first part of the mocap file. See below for further explanations.
- Mocap file quality: gives a grade to the recorded mocap file quality. If the sensor missed many frames while recording, the results could be not reliable. A higher grade means more good frames on the total number of tracked frames. The percentage good frames/total frames is also reported in brackets.
- Current frame: you can jump to the desired frame. Remember that time is expressed in cs (hundredths of second).
- Play speed [%]: you can choose the speed of replay, in percentage. More than 100% means faster then actual, less means slower. However, this value is also influenced by your PC speed. Therefore, 100% doesn't exactly mean the actual athlete's speed.
You can also make the floor semi-transparent to see the skeleton from below. Go to View > Transparent floor to change the floor opacity.
10. Plot tools: zoom, pan, scaletop
The plots window contains some tools, useful to focus on the smallest details of the plotted data. The following tutorial shows how to use the zoom, pan and scale tool.
11. Cropping mocap filestop
Cropping is useful to manually eliminate tracking errors inside a mocap file. Often the frames following the calibration contains many tracking errors, that cause the results to be wrong (i.e. excessive peaks of kinetic energy or speed in the plots).
Click on Edit > Crop in the menu bar or push the Crop button to open the crop dialog:
You will notice the plots background becoming cyan: the highlighted part is the preserved one. You can change the range of preserved frames in two ways:
- Keeping pressed the left mouse button and dragging on one of the plots: you will see the cyan ranges in all the plots that follow the mouse.
- Selecting the start and end frames in the dialog.
Once the range of frames is selected, you can click on Save and choose the path for the cropped file. If you choose an existent file, the software will ask for a confirmation before saving. You can always press the X button of the dialog to exit from the cropping procedure.
To show the cropped file, you have to close the currently loaded one and open the cropped one. To do this, click on File > Close in the menu bar or push the Close button in the interface, then follow the procedure shown above.
12. Exporting resultstop
Virtual Sensei Lite™ allows exporting analysis results. In particular, in the current software version (0.1.0) you can export:
- The kinetic energy values of the entire human body at each frame in .csv file format (Comma Separated Values).
- The speed values of the hands and feet at each frame in .csv file format.
- The above parameters in graphical format: .png (bitmap), .pdf (vector), .eps (vector).
To export data, you have to open a mocap file (see above) and click on Edit > Export plots/data in the menu bar or push the Export button to open this dialog:
The export dialog request the user to select the desired file format. Keep in mind that the graphical file format (.pdf, .eps, .png) will show the plots as seen when you exported them, including labels contents and positions. On the other hand, the .csv file format will contain the values of the parameters at each frame, with a framerate of 100 fps, in a tabular format, where each row is a frame (or a hundredth of a second if you prefer). You can open the .csv files using a common text viewer, but using a spreadsheet program, like Microsoft Excel or OpenOffice.org Calc, allows you seeing it in a tabular format.
After choosing the desired file formats, press OK and choose the path where you want to save the data. Virtual Sensei Lite™ will automatically name these files using the following tags:
athlete's name_technique name_current date_current_time.ext
Since this name includes the seconds, it is impossible to overwrite existing data. A dialog will inform you about the successful export.
13. Preferencestop
Click on Edit > Preferences in the menu bar to open the following dialog. Here you can:
- Set trajectories length: choose the length of the joints trails, expressed in frames: this means that you can see the previous X positions of the joints, where X is the chosen number of frames. Remember that frames are expressed in cs (hundredths of a second).
- Set colors: you can change the background and the skeleton colors. For example you can make the skeleton displaying the colours of the flag of your country.
- Reset default preferences: press Default will restore the factory preferences.
Press Ok to confirm your modifications: both the windows (skeleton and plots) will be closed and re-opened automatically, with your settings applied.
14. Usage examplestop
In this section some usage examples of Virtual Sensei Lite™ will be illustrated.Evaluate the best variant of a technique
This is one of the main purpose of Virtual Sensei™ Project. You can ask the athlete to execute 2 series of the same technique, i.e. a punch, but performing a little variation between the first and the second series (i.e. modifying the position of the rear foot). You can then compare the results obtained in the two variants and objectively understand which one is better for your purposes (i.e. more kinetic energy means more damage at the impact point, while more hand speed means higher probability of penetrating the opponent guard).Monitor the performance throughout the year
Since Virtual Sensei Lite™ is not time consuming, due both to the lack of markers on athlete's body and to the absence of cameras setup, it allows making a multitude of test. Moreover, data processing is totally automatic and instantaneous. This means that you, as the coach or as the athlete himself, can evaluate the performance level throughout a certain period and understand if the implemented training protocol is giving the expected results or not.Exchange/compare results online
Since Virtual Sensei Lite™ allows exporting data in both graphical and ASCII file format, you can compare your results with other coaches/athletes, not only near you but also from all over the world. An online forum will be implemented soon to improve this aspect. This means that you can discuss about numerical data (not empirical impressions), derived from a tool for instrumented biomechanical analysis.
15. Troubleshootingtop
Here we will see how to solve some typical issues. This section will be enlarged with your feedback, but we hope to keep it short.
Windows automatically installs Microsoft drivers for Kinect
Sometimes, when you plug in the Kinect, Windows automatically installs Microsoft Kinect drivers (not those by Prime Sense modified by Avin2). It happens because Microsoft has started pushing their official Kinect drivers through Windows Update.
The work-around is: from Control Panel > Hardware and Sound, open Device Manager, right-click on Microsoft Kinect\Microsoft Kinect Camera, Update Driver, Browse my computer..., Let me pick... and choose the one which doesn't start with Microsoft.
Manual drivers search
Once the SensorKinect package is installed, you can connect the Kinect to the PC for the first time. Windows will search for the device drivers, but sometimes (typical for Windows XP) it might say it can't find them. In this case, you have to manually specify the path to the drivers.
The first driver is for the Kinect Motor. Select Install from a list or specific location (Advanced) and click on Next:
Select Search for the best driver in these locations, select Include this location in the search and click on Browse. Then search for the path C:\Program Files\PrimeSense\SensorKinect\Driver and click Next:
Wait for the installation:
Press the Finish button. Windows could ask to restart the PC:
Now you have to repeat the procedure for the other two drivers (Kinect Audio and Kinect Camera) but this time the selections in the dialogs should be already correct:
Repeat the same steps and restart the PC if requested.
Recording doesn't start
If you click Rec and you see a window that appears, disappears and nothing else, make sure Microsoft Visual C++ 2010 Redistributable Package (x86) is already installed on your pc.
If you see this message after pressing the Rec button, probably the Kinect isn't connected correctly. Check the power cord to see if the green led is on and if the USB is plugged into the PC.
Errors logfile
On PCs with old graphics cards you might receive this error message when opening a mocap file or closing Virtual Sensei Lite™:
Opening the logfile VSLite.exe.log in the installation directory, you will see the following message:
VPython WARNING: errors in shader program:
This is due to old graphics hardware that does not support Pixel Shader 3.0. To avoid this error, we highly recommend upgrading your video card drivers to the latest version. However, this error doesn't influence the correct functioning of the software.
My antivirus detects a threat
Sometimes your antivirus could detect Virtual Sensei Lite setup as a virus or trojan. This is a false positive, see this test with many antiviruses: VirusTotal.com. You can create an exception to avoid the warning and the block of the file
16. To dotop
Virtual Sensei Lite™ is a work in progress, therefore there are a lot of things that should be done or improved. This list will be updated with your feedback, but our purpose is to keep it short, resolving the issues and adding the requested features.