Wednesday, August 5, 2009

FPS with Real Guns - Episode 02

Here's the second episode from Waterloo Labs. This time we are playing Half-Life (well, the flash version at least), with a real gun. Using accelerometers and LabVIEW, we can triangulate the position of where a bullet hits a piece of drywall and use that location to generate a mouse click in the game, which has been projected onto the wall.



UPDATE (8/12): If you have other crazy project ideas, comment on our newest blog post with your ideas!

UPDATE: Here is the code to complete the demo yourself.

UPDATE (14:49): Here is the system overview, parts list, and explanation of the math behind this.

51 comments:

Anonymous said...

Awesome! Where is the LV code to get this done? :)

Waterloo Labs said...

Code has been posted to

http://decibel.ni.com/content/docs/DOC-6106

Anonymous said...

...I was worried that this might not end well... but frankly, that's full of win!

TrashyMG said...

You can't just say try this at home.. but not with Real Guns.. that takes all the fun out of it..

Anonymous said...

woah, overact much? downright obnoxious...

kbmonkey said...

Very cool guys! Looks like a lot of fun, and without needing hi-tech pointing/shooting devices!

Shovels, we need more shovels, the zombies are coming!

Going to peruse the code too, thanks for this!

Anonymous said...

Very neat demo with good explanation and (most importantly) handled responsibly.

Pappy said...

Hmm, would be fun to play FPS like this, but how is the wall going to withstand my AK47 and bazooka? :D

Anonymous said...

Okay, so where can I get a BFG?

Anonymous said...

If they were playing halo they should turn the guns on themselves.

Anonymous said...

can someone say terrorist training?

Ko Saipetch said...

Very cool indeed!

Anonymous said...

What is the sampling rate for the sensors?

Anonymous said...

Mmmm Ruger supressed .22 pistol

Anonymous said...

The ranges I shoot at definitely won't allow this. This is the excuse I've been waiting for to build a proper backstop on my property!

Wife: "Why are you loading up the rifle?"
Me: "Gonna go play some Half-Life, honey!"

Anonymous said...

can someone say counter-terrorist training?

Waterloo Labs said...

Hey Anon,
The sampling rate is 102.4 kHz.

Anonymous said...

What type of accelerometer did you guys use?

Anonymous said...

Made of win and dipped in awesome sauce.

You can do it at home, just use a squirt gun, nerf gun, spitballs, paper throwing stars. The possibilities are endless!!

Karl R. said...

Your backstop appeared to be shorter and narrower than the piece of dry wall you were shooting into. It looked like at least half of the rounds that were shot probably didn't impact in your backstop. Your backstop setup definitely wouldn't have met NRA range design guidelines.

I have a private range & training facility 1 hr from Austin that has a much safer backstop that you could use. Have you tested it with larger calibers? This would be useful for doing realistic training similar to a FATS machine, if it worked with standard defensive calibers.

Waterloo Labs said...

Hi Karl,
We built the drywall in an 8x8 foot section. The berm behind it was at least 8 feet tall and far more than 8 feet wide and was backed by another berm that was far more than 8 feet tall. Additionally, we did not fire into the top 1/3 of the drywall just to be sure.

Steve is a licensed firearms instructor, so it was safety first with him! Must have been a camera trick. Thanks for checking it out!

Anonymous said...

Shit, I'd start showing up to Dorkbot again if you guys would demo.

Grant Gougler said...

Best DIY project I've seen in years.

It says you used a USB-4432 board, one version of which is $2,000 and the other is $5,000. Which one do you need? And is there an even cheaper way of doing this?

Anonymous said...

I would be curious to test this sensiitivity of the accelerometers with Airsoft guns. Level of safety improves greatly and doesn't damage the backdrop. Though I would doubt the accelerometer can pick up a 50mm ball bearing traveling 300 fps.

Anonymous said...

Kudos. Now if you could only make this possible with lasers instead of guns and artificial recoil. Laser tag online baby. And how do you move forward, etc and turn the view? You should put this on a ball tredmil and see what you can do.

carp said...

> I would be curious to test this sensiitivity of the
> accelerometers with Airsoft guns. Level of safety
> improves greatly and doesn't damage the backdrop.
> Though I would doubt the accelerometer can pick up a
> 50mm ball bearing traveling 300 fps.

The level of safety only improves greatly if you are standing behind the drywall. There is just no way a bullet is going to ricochet off drywall... or a dirt mound backstop.

Perhaps the only real gun you have access to is a desert eagle and you mean the risk of breaking your wrist?

Anonymous said...

Ya'll should be playing the Reflex series of games off www.missionred.com

Waterloo Labs said...

To answer the last round of questions
- 4432 is only 2000, the 5000 dollar version includes software you don't need (though it is pretty cool).
- Airsoft guns definitely work, in building it we used rubber bands.
- It is definitely possible to do it cheaper - we chose the 4432 because it has built in accelerometer excitation and good accelerometer acquistion.

Matt said...

Have you thought of turning this into a product? The shooting sports is having trouble attracting kids from the video game generation, something along these lines could go along way to getting more people involved in the sport.

Anonymous said...

mix this with the wii balance board and you might have a real life fps.

Terrell Prude' Jr. said...

*** BOOM HEADSHOT!! ***

OK, this definitely qualifies as a VERY COOL HACK. You clearly put some time into this. Nice work! +1 for making this into a product, say, with one of those air guns that shoots the plastic BB's, which would be reusable and cause no damage. This would be great for introducing people to the shooting sports in a safe and inexpensive manner.

As for the FPS_Doug quote, seriously, have you sent this news to the Pure Pwnage guys? I'm sure they'd get a major kick out of this hack. Heck, they might even feature it in their show.

--TP

Anonymous said...

OMG! army ... needs.... this....

Anonymous said...

really wish you had used crowbars instead of shovels.

robotguy said...

Just for clarification on the math, this uses trilateration not triangulation: http://en.wikipedia.org/wiki/Trilateration

Eran Gal-Or said...

Is there a CHEAP replacment for the USB-4432 device?

apossium said...

is accelerometer compatible with arduino board ?

would like to know if it is possible to do the same thing in a cheaper way … !

apossium said...

maybe plugin' a wiimote accelerometer to a arduino based board

only things to do is data acquisition and software

Waterloo Labs said...

@ Eran Gal-Or The important features in your daq device are that it simultaneously smaples all channels so the signals from each accel can be directly compared and the higher the sampling rate the better resolution you will get.

We are looking into doing this a USB-6009 (from our last project) and $2 radio shack microphones (which could also sample the impact signal).

Of course if you beat us to the punch with a cheaper alternative certainly let us and everyone else know!

Taylor said...

That was way awesome.

days become nights faster and faster said...

Just pure awesomeness. I laughed so hard when you guys took shovels to them, especially the last shoven-to-head hit, classic.

Anonymous said...

There was a similiar system out a dozen years ago that used some badly acted video scenarios instead of games.
However, the system used self-sealing foam mats for a video screen. The bullets left very small holes that looked amazingly like a #2 pencil had been poked into it. From 7 feet, the punctures were invisable and the screen could take thousands of rounds before needing to be replaced.

If I remember correctly, the range that used the above system was located somewhere near College Station.

Mitchell Vincent said...

Very cool stuff.. Though it is worth mentioning that, at least in it's current form, this is far outside the reach of most hobbyists. The DAQ alone costs thousands, not to mention the thousands more for a copy of LabView.

I've been trying to come up with a USPSA practice setup that uses airsoft for some time. I think I got some ideas from you guys -- I'll post if we ever get it working (and affordable)! Thanks!

Internet and Computer Technology said...

Nice post, can you give more information about this again ?, Can we Be friend ? :)
Software Source

Anonymous said...

What accelerometers were used (parts list is too general, I want to know actual parts so I can look at its data sheet).

adatesman said...

Just found this and am both amused and impressed. In your post on 8/9 you mentioned looking into doing this with a USB-6009... any luck with that? I just happen to have one sitting here and would love to give this a try.

Aric Datesman said...

Seems to me that reading the voltage spike from a piezo film vibration sensor would be a workable (and cheap) alternative to the accelerometer approach, by which I mean I've got them rigged up to my USB-6009 and it reads the impacts just fine. Any hints on tweaking your VIs for this? Unfortunately I know next to nothing about Labview, so haven't had much luck with it.

Henrique Vilela said...

First, gratz for the project!

Without the NI USB-4432 you just lose precision or it's impracticable?

Waterloo Labs said...

@Henrique
We needed to use a USB 4432 because it gives us simultaneous sampling. That is, each channel has its own ADC and the signal is not multiplexed. Because these signals happen over such a short time span, if we were multiplexing the signal, we would miss the impacts. We had to use simultaneous sampling for this reason.

WaterlooLabs said...

So, the code should be almost identical for using a USB-6009. The only thing that needs to change is the device name if I remember correctly. The DAQmx driver is used by both the 4432 and the 6009 so all of the acquisition code should remain unchanged.

I am a bit concerned about the resolution you will have. The max sampling rate of the 6009 is 40kHz aggregate, so on 3 channels you will be sampling at 16.666 kHz (if my mental math is right). I would have to look up the speed of sound in drywall again but I believe we had thought the resolution in feet was too low for it to be workable.

Not trying to discourage you, just let you know some of the hurdles we ran into and why we went with the 4432.

Anonymous said...

This is all kinds of cool. Someone please come up with a cheaper solution. The zombie invasion is coming and we're all gonna need to do some practicing. ;-)

Anonymous said...

Very Cool! I was really hoping to see your solution to the three-pickup version. Something other than "by solving this system..." Where's the real 2D solution?

Post a Comment