P5 Glove finger reading DLL and Unity3d demo

Discussion of tools and products that add VR physicality. Samples include VR treadmills, special hand controllers, gesture technology and more.
Post Reply
WiredEarp
Golden Eyed Wiseman! (or woman!)
Posts: 1498
Joined: Fri Jul 08, 2011 11:47 pm

P5 Glove finger reading DLL and Unity3d demo

Post by WiredEarp »

P5GloveDLL

This uses the P5Glove class I wrote for the mouse driver, and compiles it into a DLL. I wrote this so I could read my P5 Glove in Unity3d Pro. Its so basic its not even worth explaining, just drop it into your Unity project and access it (see the Unity sample here for an example of its use if you haven't used DLL's in Unity before). Note this DLL only reads the fingers positions, it doesn't bother with the sensor data from the outdated P5 sensor base.
P5GloveDLL bare DLL.rar
P5GloveDLL sourcecode.rar
P5GloveUnityTest
P5 Glove unity demo screenshot.jpg
This is a very simple example showing how to use the P5 Glove DLL in Unity. I assume you can probably use other P5 DLL's instead if you'd rather, such as the GlovePIE one (as long as they work for your glove). In it, i've taken the Sixense hand sample and put some very simple code in to make the fingers onscreen bend when you bend the P5 Gloves fingers. I haven't used the Hydra specific components (so no Hydra tracking in the example, just finger motion), so as to make it as simple as possible to understand. Just take a look at the 'P5Fingers.cs' class, and you'll see how simple it is to get finger tracking into your Unity application.
UnityDLLTest.rar
You do not have the required permissions to view the files attached to this post.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by cybereality »

Ha! Is the P5 making a comeback?
WiredEarp
Golden Eyed Wiseman! (or woman!)
Posts: 1498
Joined: Fri Jul 08, 2011 11:47 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by WiredEarp »

Ha! Is the P5 making a comeback?
I doubt it :D but it sure is nice to flex the fingers. I'm sure something much more capable will come along soon 8-)
Caliber Mengsk
One Eyed Hopeful
Posts: 7
Joined: Wed May 15, 2013 3:18 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by Caliber Mengsk »

WiredEarp wrote:
Ha! Is the P5 making a comeback?
I doubt it :D but it sure is nice to flex the fingers. I'm sure something much more capable will come along soon 8-)
http://www.mtbs3d.com/phpBB/viewtopic.php?f=145&t=19117
Working on it :D

Been having issues getting it started as of late, and have finally fixed those bugs, so hopefully can get a new video up soon with it interacting with things in a useful way. :D
Krenzo
Binocular Vision CONFIRMED!
Posts: 265
Joined: Tue Sep 07, 2010 10:46 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by Krenzo »

I ordered a P5 Glove off of ebay, and I was surprised to find that each flex sensor actually has two sensors in it to track both the knuckle and the proximal joints. It's not all that bad for finger tracking.
WiredEarp
Golden Eyed Wiseman! (or woman!)
Posts: 1498
Joined: Fri Jul 08, 2011 11:47 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by WiredEarp »

@ Caliber Mengsk: I saw your video a week or two back and it looks quite smooth. Seems slightly more accurate than one of my P5s (my other one is brand new and seems ok).

I have another glove design I wish to work on now that doesn't use resistive finger tracking (like you mentioned you were planning on moving away from). Resistive is nice to implement but I'd rather use something more reliable/less fragile for a heavy use glove. Maybe i'm just biased due to the buggy thumb on one of my P5's. Be interested to see your next version.
erb365
One Eyed Hopeful
Posts: 1
Joined: Thu Dec 18, 2014 2:37 am

Re: P5 Glove finger reading DLL and Unity3d demo

Post by erb365 »

Thats cool how do I make it so that if i move my hand in real life it moves the hand in unity also? I tried attaching the sixens scripts but it din't work
WiredEarp
Golden Eyed Wiseman! (or woman!)
Posts: 1498
Joined: Fri Jul 08, 2011 11:47 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by WiredEarp »

Well... this is a 4 year late reply, sorry erb365!

The driver only includes finger tracking, as the P5 tracking was simply too unreliable (and not 6dof) to be useable. You need to provide your own tracker.
The app I provided in another link (https://www.mtbs3d.com/phpBB/viewtopic. ... 45&t=19552) allows/allowed you to use any VRPN source as the tracker, or you can use a Razor Hydra.

Since its now 4 years later, and VR has advanced a lot, I'd simply add a SteamVR tracker. This driver should still work for reading the finger bends from a P5 glove.
Jabberwock
Cross Eyed!
Posts: 197
Joined: Mon Mar 02, 2015 3:58 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by Jabberwock »

I wish I knew enough about programming to write a P5 plugin for FreePIE... My glove is still working quite well, I have considered disassembling it to use the flex sensors with some kind of orientation tracker, but I did not have the heart to take it apart.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: P5 Glove finger reading DLL and Unity3d demo

Post by cybereality »

You can buy flex sensors, you don't need to take the glove apart.
https://www.sparkfun.com/products/8606
Post Reply

Return to “Physical VR Tools”