Society of Robots - Robot Forum

General Misc => Misc => Topic started by: futurrobotech on October 09, 2010, 10:26:09 PM

Title: game controller "design"
Post by: futurrobotech on October 09, 2010, 10:26:09 PM
So I've got a task to design a game controller using two different sensors and im thinking about designing something that could be used for virtual reality perhaps wearing a headset.. So to the player could wear the head set then spin around and have a sensor detecting them rotating.. Do you agree that this can be achieved with some type of electronic compass?
Title: Re: game controller "design"
Post by: macdad- on October 10, 2010, 07:26:32 AM
An electronic compass would be one solution but would render the "controller" quiet slow to respond.

You could still go with an electronic compass paired up with multiple accelerometers. You would use the compass to find the player's Polar coordinates(The angle from North that they are facing) to direct the in-game 3D Camera. The accelerometers would measure the 3-Axis velocity of the player whether the player is moving forwards/back/strafing left/strafing right/etc. The accelerometers would then determine the Radius that the player is from the center of the map.

You would then, in-game, convert the Polor Coordinates given by the Compass and Accelerometers into X,Y coordinates for the player's position on the game map.
Title: Re: game controller "design"
Post by: futurrobotech on October 10, 2010, 08:23:39 AM
if I were to use the compass for rotation and had it sending a number for the rotation of the "player" would it be slow? And also accelerometers are a good idea but I was try to steer away from making something like a wii, but accelorometers almost seem inevitable to use
Title: Re: game controller "design"
Post by: macdad- on October 10, 2010, 08:30:29 AM
Accelerometers are 'bout the only thing you can use for velocity measurements.

But! You can still use the electronic compass idea as it is very reliable but somewhat slow(maybe). This one: http://www.globalspec.com/FeaturedProducts/Detail/honeywell/HMC6352_TwoAxis_ChipScale_Digital_Compass/11354/0 (http://www.globalspec.com/FeaturedProducts/Detail/honeywell/HMC6352_TwoAxis_ChipScale_Digital_Compass/11354/0) has an update frequency of a maximum of 20Hz, so its relatively fast(Guess I spoke to soon).
Title: Re: game controller "design"
Post by: futurrobotech on October 10, 2010, 09:05:19 AM
I guess ive found out why nobody has ever used this idea... Hmm I'm not sure what to do. We were told to come up with an unique idea so I guess this could count as an unique idea (not saying it will work)
Title: Re: game controller "design"
Post by: knossos on October 10, 2010, 09:35:00 AM
Well you could try a crown of IR detectors and fixed position IR emitters, then the crown could act like an encoder.  Would be really cheap to try and I would think that would be somewhat unique.
Title: Re: game controller "design"
Post by: Razor Concepts on October 10, 2010, 10:39:49 AM
Gyroscopes give you rotational velocity in degrees/sec (usually), so they would be a good choice.

Head-tracking devices exist, however, search for "head tracking fpv"
Title: Re: game controller "design"
Post by: futurrobotech on October 10, 2010, 01:11:11 PM
Well you could try a crown of IR detectors and fixed position IR emitters, then the crown could act like an encoder.  Would be really cheap to try and I would think that would be somewhat unique.
that would be something to try.. the people that are requiring us to do this to stay in the program are more just looking for an idea...

@razor: yeah ive though about gyros too.. probably the BEST and EASIEST option.. and ill look into head tracking fpv
Title: Re: game controller "design"
Post by: madsci1016 on October 10, 2010, 05:13:57 PM
Hey guys.

I want to clear a bunch of things up in this thread.

First,

Accelerometers are 'bout the only thing you can use for velocity acceleration measurements.

Fixed that for you. I'm not usually a grammar cop, this one just bugged me for some reason. Accelerometers only measure lateral acceleration.

Ok, here's the mini lesson that should clear some things up.

(http://www.intmath.com/Vectors/3D-boxes.gif)

Accelerometers measure acceleration, not velocity. They can be used for orientation sensing since gravity is constant, but that's assuming there's no acceleration in other vectors since they can only measure the sum of the forces. For example, a accelerometer upright with a secondary lateral acceleration in the x direction (assuming z direction has vector due to gravity) will have similar output to a sensor oriented slightly so that the gravity vector has a x and z term. The only difference would be magnitude. Also, they are very noisy.

Gyroscopes measure angular velocity, from which angular position can be derived through integration. They are fairly sensitive but have a single weakness of drift. Since they have to be sampled discretely, any velocity data outside the average of two subsequent samples is lost, and causes the derived position to 'drift'. For example, if you rely entirely on gyros, after a few minutes, looking forward using your helmet won't be looking forward in the game anymore. The more you play, the worse the drift gets.

A compass measures absolute angular position, but only in the xy plane. It is a slow and noisy sensor, but never drifts. North is always north (well, not always, but that's another lesson).

For full 3D inertial measuring, a common practice is to combine the fast and accurate sampling of gyros, the absolute reference of a compass for XY vector, and accelerometers to measure gravity for the absolute reference in the other two planes. If you miss any one of these three pieces, you will not have a fairly accurate measuring sensor.

Wii gets around using a compass by using an IR led and camera as the absolute reference for angular position, and uses gyros and accelerometers in-between IR reads.

Title: Re: game controller "design"
Post by: Webbot on October 10, 2010, 05:45:48 PM
A compass measures absolute angular position, but only in the xy plane. It is a slow and noisy sensor, but never drifts. North is always north (well, not always, but that's another lesson).

And to make stuff worse - the above is not always the case either.

For example: a CMPS03 does the above if it is parallel to the xy plane - giving a bearing in the Z axis. But if you start to rotate it in the x or y axis then the readings get effected wildly. So now you need to adjust the compass reading to compensate for the tilt.
Title: Re: game controller "design"
Post by: madsci1016 on October 10, 2010, 06:25:35 PM
Yeah, that was part of the

Quote
(well, not always, but that's another lesson).

along with hard/soft iron offsets, calibration, and magnetic declination.

At least with what you mentioned, (as you know, but for others sake) there are compass modules that will correct tilt for you, so you don't have to worry about it.
Title: Re: game controller "design"
Post by: macdad- on October 11, 2010, 09:01:29 AM
Hey guys.

I want to clear a bunch of things up in this thread.

First,

Accelerometers are 'bout the only thing you can use for velocity acceleration measurements.

Fixed that for you. I'm not usually a grammar cop, this one just bugged me for some reason. Accelerometers only measure lateral acceleration.

And ironically I just got acceleration down in Physics.


You could try something radical, like a gyroscope/electronic compass. Have a free rotating ring of magnets with an outside, fixed ring of Hall Effect sensors to measure polar angle of the player. This is more responsive compared with an electronic compass as the magnets have a much, much denser flux field than the Earth does.
Title: Re: game controller "design"
Post by: madsci1016 on October 11, 2010, 11:20:30 AM
You could try something radical, like a gyroscope/electronic compass. Have a free rotating ring of magnets with an outside, fixed ring of Hall Effect sensors to measure polar angle of the player. This is more responsive compared with an electronic compass as the magnets have a much, much denser flux field than the Earth does.

Not radical; you just described how a magnetic encoder works.