It is currently Tue May 21, 2013 3:54 am



Reply to topic  [ 93 posts ]  Go to page Previous  1, 2, 3  Next
 [Video] Diy HeadTracking - Sparkfun Razor, Python, Gmod, 
Author Message
Terrif-eying the Ladies!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 941
Location: Stockholm, Sweden
Dont think it will compile for the Sparkfun IMU, different sensors :/


Wed Apr 11, 2012 12:31 pm
Profile
Terrif-eying the Ladies!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 941
Location: Stockholm, Sweden
Looks like it should be able to compile for the ADX345 Acc, but im a noob on C and Arduino, someone wanna give it a shot?


Thu Apr 12, 2012 2:54 pm
Profile
One Eyed Hopeful
User avatar

Joined: Thu Feb 02, 2012 5:19 am
Posts: 17
Location: The Netherlands
Hey CyberVillain, any update on this? :) Curious if you made any progress to eliminate that drift problem of yours... Also, are you using GlovePIE or FreePIE? I found this on pastebin through your YouTube channel:
Code:
    var.freelookKey = Mouse.RightButton || Keyboard.RightAlt
    var.enableKey = Keyboard.Z
     
    var.sensitivity = 25
     
    var.yaw = RemoveUnits(TrackIR.Yaw)*var.Sensitivity
    var.pitch = RemoveUnits(TrackIr.Pitch)*var.Sensitivity
     
    if(Pressed(var.enableKey)) {
    var.enabled = !var.enabled
    }
     
    if(var.freelookKey && var.enabled) {
    var.mx+=delta(var.yaw)
    var.my+=delta(var.pitch)
     
    fakemouse.DirectInputX = var.mx
    fakemouse.DirectInputY = var.my
    }

This is for GlovePIE right? But (bare with me, I've only been reading up on this all since last night) can be used in FreePIE? Going to test it after dinner and see if I can hook this up with UDK (Unreal Development Kit). I'm using a Bluetooth module to send all values from the Razor, but so far in FreePIE i'm getting good results.

Also found this video of a guy using a FreeIMU with Gary's Mod and there's no drift at all. Might be worth checking out how the Source engine (or Gary's Mod itself) handles all the input! I know it's not a Razor IMU, but still, might shed some light..
Videolink: http://www.youtube.com/watch?v=vVrflj30 ... 1337100842

_________________
Imagination is more powerful than knowledge..


Tue May 15, 2012 10:56 am
Profile WWW
Terrif-eying the Ladies!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 941
Location: Stockholm, Sweden
Thats GlovePIE code, havent bothered to upload the FreePIE code to youtube, FreePIE is still so small. But yes, I have this running with FreePIE too, nice that FreePIE is working nicly for you.

FreePIE equivalent of above GlovePIE code (Freetrack plugin used but can be switched to the other ones)
Code:
if(starting) then
enabled = false
multiply = 20
   freeTrack.Update:Add(function()
      yaw = math.deg(freeTrack:getYaw())
      roll = math.deg(freeTrack:getRoll())
      pitch = math.deg(freeTrack:getPitch())
      
      deltaYaw = filters:delta(yaw)
      deltaPitch = filters:delta(pitch)   
      
      if(enabled and hotkey) then
         mouse:setDeltaX(deltaYaw*multiply)
         mouse:setDeltaY(-deltaPitch*multiply)
      end
   end)
end

hotkey = mouse:getRightButton()
toggle = keyboard:getPressed(Key.Z)
if(toggle) then
   enabled = not enabled
end


I dont know if its my Sparkfun IMU or if I live in a magnetic field of some kind, but I cant get it to work :/
Nope didnt get that code to work property, this is as far as I got




Yeah I know about that guy, it was him taht got me on the Sparkfun track.. Hes not using any filters other than the fusion in the FreeIMU lib


Tue May 15, 2012 1:51 pm
Profile
One Eyed Hopeful
User avatar

Joined: Thu Feb 02, 2012 5:19 am
Posts: 17
Location: The Netherlands
Thanks a lot CyberVillain! You made my day by sharing that with me ;)

1. So far I got it working (got rid of the hotkey and use only the toggle function) and quick tested it in Crysis 2. Seems your multiplier was set pretty high, but I'm sure it's all game related?

2. And oh, just to let you know I'm having the same drift issues you've been having so it's definitely not your IMU. Haven't calibrated it yet with the AHRS so going to do that as well before trying again.

3. I've used a USB cable this time to get it to work, since my Bluetooth module outputs in binary mode by default apparently. Need to change that into text output, burn it again and test it WITH the Bluetooth module. Going to do so this afternoon and post any results here.

And now for another FreePIE question: How can I send serial commands? I know GlovePIE uses "Serialout(COM12, "COMMANDHERE")" and I did a quick search for a LUA equivalent. Or am I going at it from a totally wrong angle? Would like to know how to do this because I can make my Razor IMU output text format with a command (#ot) as you probably know. This way I won't have to rewrite the Arduino code and it gives me the possibility to synch with it so I won't run into any reset problems.

Any input is much appreciated guys!

_________________
Imagination is more powerful than knowledge..


Wed May 16, 2012 5:11 am
Profile WWW
Terrif-eying the Ladies!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 941
Location: Stockholm, Sweden
Hi Mate, I moved the discussion to the FreePIE forum

viewtopic.php?f=120&t=14483&p=73388#p73388


Wed May 16, 2012 5:46 am
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
i would really like to keep this discussion going, mars s video just looks so neat!
mars, i would really appreciate if you could talk (or even share some code? ;) about the gmod changes..


Wed May 30, 2012 2:20 pm
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
hello all !

it took me a while ( cause i never did anything like this before, neither programming ), but i succeeded..
thanks to the code of mars (and some tweeks) and the freeimu documentation .. and and ... i finally got it working!

im using free imu and a arduino mini, free imu library and gmod as well..



so thanks to you guys and your forum.. just for beeing here and giving information!

cheers
numu


Fri Jun 22, 2012 10:22 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2037
Location: Irvine, CA
good work. congrats on learning a new skill as well.


Fri Jun 22, 2012 10:25 am
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 10026
@numu: Wow man! That's really impressive if that's your first foray into programming.

_________________
Image


Fri Jun 22, 2012 6:54 pm
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
cybereality wrote:
@numu: Wow man! That's really impressive if that's your first foray into programming.


i try d to learn as3 .. but didnt really finish anything with it, but i know what a method is :)


Tue Jun 26, 2012 4:32 am
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
here a small update :)



Sun Jul 29, 2012 5:37 am
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 10026
Cool.

_________________
Image


Sun Jul 29, 2012 6:26 am
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
hey guyz n girlz

i thought i d hook you up with a small progress :)

hoping to achieve a successful fieldtest next week



what you see here is the working movement per X/Y coords from the camera
the imu angles, but that worked before as well..
and the possibility in gmod to port from one room to another and backwards, adding the changed coords to the camera XY.

now its possible to see more then one room eventhough the real room didnt change,.. (what is the core of my theaterplay idea that i m trying to realize ;)

thanks for watching
numu


Sun Oct 21, 2012 11:17 am
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 10026
Nice.

_________________
Image


Sun Oct 21, 2012 11:44 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2037
Location: Irvine, CA
Cool, what camera is that?


Sun Oct 21, 2012 2:41 pm
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
brantlew wrote:
Cool, what camera is that?


a ps3eye cost like 12 euros (15 dollars ~)

its cool because it makes 60 fps


Mon Oct 22, 2012 12:48 pm
Profile
One Eyed Hopeful

Joined: Mon May 21, 2012 5:00 pm
Posts: 8
brantlew wrote:
Cool, what camera is that?



or you mean the camera i recorded the clip with? thats a go pro 920


Mon Oct 22, 2012 12:52 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 93 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.