Log in

View Full Version : Has anyone ever used a Computer Mouse to locate themselves on the field


staplemonx
31-07-2011, 15:09
I have worked on an inertia navigation system for aircraft (http://en.wikipedia.org/wiki/Inertial_navigation_system) and was thinking of how to do something similar on the cheap. Last year I was able to see how different teams located themselves on the field for autonomous systems. Some worked well and others, eh...

So I am curious if anyone has ever tried using one or more laser computer mice to replicate an INS system. As long as my tolerance is over 12 inches in the x and y it should work great. In fact if I put two or three on their and was really picky about my starting position I bet it could hold a tolerance of less than a few inches. It’s cheap, the drivers exist and it does not rely on any external references.

Any thoughts?

rahilm
31-07-2011, 15:29
I know team 972 tried this before they merged with our team in 2008. IIRC, they used just a mechanical mouse, where they had the ball running against the ground. I don't think they had all too much success, but it looked fairly promising. I think with laser mice, you will run into a similar problem of having to have it very close to the ground. This could have been a problem for the last two years (bumps + lip by goal for Breakaway, and lip by poles for Logomotion).

staplemonx
31-07-2011, 15:31
This could have been a problem for the last two years (bumps + lip by goal for Breakaway, and lip by poles for Logomotion).

That makes sense.

Good to know though.

Thanks

EricH
31-07-2011, 15:34
A few teams used a follower-wheel system in 2009, using unpowered omni wheels attached to encoders or something similar.

lemiant
31-07-2011, 16:14
This has been my pet project for a while. As long as your robot pivots around a single point and doesnt strafe, then a follower wheel and a high accuracy gyro should be able to integrate for position. Alternatively if you can find a high speed trackball (over 15fps, which I have so far been unable to do), you could use that and strafing wouldn't be an issue.

If you are really interested in using a laser mouse, i would suggest looking up the razor gaming mouse (as it is the only one that i know is fast enough), then milling it a plastic mount with rounded edges to get over bumps, and spiring tensioning the mount against the ground.

DonRotolo
31-07-2011, 16:30
(Laser mice don't actually use lasers. And in 2011 "lasers" were not allowed. FWIW.)

Anyway, if this were combined with some distance sensors (I'm thinking ultrasonic) you should be able to recalibrate your position from time to time, when conditions are 'right'. Add odometry and a 2-axis accelerometer and you might be onto something...

Ether
31-07-2011, 16:49
So I am curious if anyone has ever tried using one or more laser computer mice to replicate an INS system.

Perhaps you meant to say "replace" instead of "replicate".

Mice don't work on an inertial principle.

What kind of drivetrain would you be using?

lemiant
31-07-2011, 17:00
(Laser mice don't actually use lasers. And in 2011 "lasers" were not allowed. FWIW.)

Anyway, if this were combined with some distance sensors (I'm thinking ultrasonic) you should be able to recalibrate your position from time to time, when conditions are 'right'. Add odometry and a 2-axis accelerometer and you might be onto something...

Why so many sensors? Im especially interested in the accelerometers, how would you use them? An accelerometer is pretty much useless for tracking given our restrictions (as I'm sure the asker knows), since you needs an impressively accurate attitude value in order to filter out gravity.

EDIT: would laser mice be allowed in the 2011 rules?

Colin P
31-07-2011, 17:02
A few teams used a follower-wheel system in 2009, using unpowered omni wheels attached to encoders or something similar.

I know some of these were used for traction control. They would compare the rotation on their powered wheel encoders to the rotation in the unpowered wheel to see if they were actually moving as fast as they thought they were (if at all).
I know team 51 had some kind of location on their drivers station in 2010. I'm not sure why they used it, but it worked pretty well.

EricH
31-07-2011, 17:18
Why so many sensors? Im especially interested in the accelerometers, how would you use them? An accelerometer is pretty much useless for tracking given our restrictions (as I'm sure the asker knows), since you needs an impressively accurate attitude value in order to filter out gravity.

EDIT: would laser mice be allowed in the 2011 rules?
<R02-D> prohibits any device with an exposed laser. I highly doubt that you could argue that the mouse's optics are not exposed.

BTW, a number of teams use accelerometers without any problems. Gravity is either accounted for or ignored, but the accelerometers are reasonable in cost and complexity.

Tristan Lall
31-07-2011, 17:40
This idea has been thrown around for years, in FIRST and elsewhere (http://www.chiefdelphi.com/forums/showthread.php?t=71182). I don't think anyone has really solved the problem of carpet providing a poor surface for taking measurements. I believe there were a few optical mouse systems in 2009, when the fibreglass panels were being used as a floor surface.

(Laser mice don't actually use lasers. And in 2011 "lasers" were not allowed. FWIW.)There are actually a few (http://en.wikipedia.org/wiki/Optical_mouse#Laser_mice) optical mice that use real lasers.

The laser rules have been a bit of a mess in the past, but the general trend has been to prohibit them if exposed. ("Exposed" is ambiguous—exposed to what, when, and on purpose?)

rahilm
31-07-2011, 17:46
<R02-D> prohibits any device with an exposed laser. I highly doubt that you could argue that the mouse's optics are not exposed.

BTW, a number of teams use accelerometers without any problems. Gravity is either accounted for or ignored, but the accelerometers are reasonable in cost and complexity.

Using accelerometers to yield position though would be fairly inaccurate. Integrating once to get velocity shouldn't be too bad, but the second integration won't be too accurate, especially considering that you're going to be 1 processor cycle behind (time wise) on position.

Edit: This is what I mean by being 1 processor cycle behind. To integrate, you basically have to use Reimann sums in this case. For best accuracy, you'd want trapezoidal sums, so for 1 position value, you need 2 velocity values, so 3 acceleration values. This means you'd have to integrate acceleration for 2 cycles to get the two velocity values required for a single position value, putting you 1 cycle behind realtime.

lemiant
31-07-2011, 18:21
<R02-D> prohibits any device with an exposed laser. I highly doubt that you could argue that the mouse's optics are not exposed.

BTW, a number of teams use accelerometers without any problems. Gravity is either accounted for or ignored, but the accelerometers are reasonable in cost and complexity.

Gravity could be concievably ignored, but even a slight rock of the robot would make position tracking invalid. For about 4 grand you can get a commercial grade INS that will do all the work for you, but that is obviously not viable.

staplemonx
31-07-2011, 18:23
Perhaps you meant to say "replace" instead of "replicate".

Mice don't work on an inertial principle.

What kind of drivetrain would you be using?





I meant replicate the functionality of an INS system. Instead of using gyros and accelerometers and an initial location, i use an initial coordinate and a set of x y inputs from a mouse.

Ether
31-07-2011, 18:32
I meant replicate the functionality of an INS system. Instead of using gyros and accelerometers and an initial location, i use an initial coordinate and a set of x y inputs from a mouse.

What kind of drivetrain will you be using?

staplemonx
31-07-2011, 18:43
(Laser mice don't actually use lasers. FWIW.)



Very cool to know http://computer.howstuffworks.com/mouse4.htm

EricVanWyk
31-07-2011, 19:05
Optical Mice would not be legal by last years rules.

We did some visual odometry using a pair of optical mice (chips) and different lenses a while back. We were only able to get it to work at fixed focal lengths - each length requiring a different lens. We were unable to get it to work with variable lengths, but I have to admit that optics isn't my strong suit.

You can buy optical mice chipsets on their own, which has the benefit of allowing you to pull the actual image out - this will help you focus.

Ether
31-07-2011, 20:37
...you're going to be 1 processor cycle behind (time wise) on position.

Edit: This is what I mean by being 1 processor cycle behind. To integrate, you basically have to use Reimann sums in this case. For best accuracy, you'd want trapezoidal sums, so for 1 position value, you need 2 velocity values, so 3 acceleration values. This means you'd have to integrate acceleration for 2 cycles to get the two velocity values required for a single position value, putting you 1 cycle behind realtime.


Assuming that X0 and V0 are given, and assuming that the update period dt is short enough that the acceleration is accurately approximated as a linear function of time, then the position is given by:

X1 = X0 + dt*V0 + dt2*(a1 + 2*a0)/6

X2 = X1 + dt*V1 + dt2*(a2 + 2*a1)/6

.
.
.

Xn = Xn-1 + dt*Vn-1 + dt2*(an + 2*an-1)/6

ratdude747
31-07-2011, 20:47
my former team (1747) once considered trying the optical mouse routine in 2009. however, getting a mouse to track on the regolith while not touching the floor was next to impossible... and the need for it wasn't there in 2010. I was on a different team in 2011 and the idea was never mentioned

If one can get the robot and the mouse to communicate effectively, the rest is code, calibration, and some vectors. good luck on the project!

Alan Anderson
31-07-2011, 23:19
The laser rules have been a bit of a mess in the past, but the general trend has been to prohibit them if exposed. ("Exposed" is ambiguous—exposed to what, when, and on purpose?)

It's clear to me that "exposed laser" means that the laser light itself can escape the assembly in which it is generated. A "laser ring gyro" which uses a sealed optical path would be permitted (as long as it satisfied all other rules, of course).

Optical Mice would not be legal by last years rules.

Which rule would rule them out?

We did some visual odometry using a pair of optical mice (chips) and different lenses a while back. We were only able to get it to work at fixed focal lengths - each length requiring a different lens. We were unable to get it to work with variable lengths, but I have to admit that optics isn't my strong suit.

The TechnoKats experiments with a "telephoto mouse" system showed early promise. We eventually found that the distance from sensor to carpet was a critical parameter, and a few millimeters of variation in height ruined the calibration between measured mouse motion and actual distance traveled. An FRC robot bounces enough while driving to make accurate odometry impractical.

lemiant
31-07-2011, 23:31
I think that if you placed a high speed mouse in a plastic mount with rounded sides to ride over obstacles and then pressed it against the floor with compression springs you might be able to make this work.

I have posted a CAD illustrating this (http://www.chiefdelphi.com/media/papers/2576?), and I tried to post some pictures, but for some reason they aren't showing up.

FRC4ME
01-08-2011, 01:18
In 2009 (Lunacy), 339 contacted a company that manufactured the optical sensors used in mice. They said they do not recommend their products for absolute motion tracking applications.

That doesn't mean a dedicated team couldn't get it to work, though.

Tristan Lall
01-08-2011, 01:36
It's clear to me that "exposed laser" means that the laser light itself can escape the assembly in which it is generated. A "laser ring gyro" which uses a sealed optical path would be permitted (as long as it satisfied all other rules, of course).I agree with respect to ring laser gyros—in fact, those are specifically permitted per the 2011 rules.

The definition question depends on the conditions under which the laser is "exposed". Couldn't you argue that because the robot is designed to point the laser at the floor from within a shielded enclosure, that the combination of floor and robot serve to completely enclose the laser? Does the presence of an obvious failure mode (overturning the robot) negate this argument? (And what if the robot compensates for this by shuttering the laser as this failure is detected?) And given that <R02> is a safety rule, is exposure defined in terms of exposure to the surroundings in general, to humans, or to the laser-sensitive parts of humans (eyes, for ordinary lasers)? Furthermore, given that lasers are (almost completely) collimated, if the start and end points of a laser are not directly in any plausible line of sight (e.g. a laser beam across an opening in the robot), is that considered exposed? And what about reflected (i.e. substantially less collimated) light from a laser? Does that figure into exposure? Finally, there's the pedantic question of whether the rule is referring to a laser (the device), the aperture of a laser device, a beam of laser light, or some combination of those, when it talks about exposure.

It's not that your interpretation is unreasonable—quite the opposite. It's just that there are a number of other interpretations that might plausibly have been intended.

Alan Anderson
01-08-2011, 07:51
Couldn't you argue that because the robot is designed to point the laser at the floor from within a shielded enclosure, that the combination of floor and robot serve to completely enclose the laser?

I reject that argument. The laser in that application is designed to shine on something outside the robot (e.g. the floor). Only an exposed laser could do that. As you point out, if the floor isn't where it's supposed to be, the light escapes.

And given that <R02> is a safety rule, is exposure defined in terms of exposure to the surroundings in general, to humans, or to the laser-sensitive parts of humans (eyes, for ordinary lasers)?

Without further detail in the rule, it has to be interpreted as the most general possibility. While one could reasonably assume that eyes won't be underneath or inside a robot during a match, a reflective surface could be anywhere.

Finally, there's the pedantic question of whether the rule is referring to a laser (the device), the aperture of a laser device, a beam of laser light, or some combination of those, when it talks about exposure.

I think the only reasonable answer to that question is the thing which makes a laser distinct from any other component: the laser light itself.

An easy relaxation to the "no lasers" rule would be to permit the equivalent of a cheap laser pointer by limiting the power of any emitted beam to a safe level (i.e. Class 1 (http://en.wikipedia.org/wiki/Laser_safety#Classification)).

Garrett.d.w
01-08-2011, 10:48
I am pretty sure that this was mentioned before, but because it is continuously mentioned in this thread I would like to restate it. What most people refer to as a "Laser" mouse, is really just a camera pointed down at a flat surface that tracks the movement of the unit. The red light that you see coming out of the mouse ("laser") is an LED that illuminates the surface for easier tracking. There are a few true laser mice out there that replace the LED with a laser and use a slightly different type of camera, however, these are few and far between (I can only think of 3 or 4 models).

Because most "laser" mice don't actually contain a laser, just a camera and a red LED, I am pretty sure that they are legal as long as they abide by the rules governing custom circuits.

EricVanWyk
01-08-2011, 11:48
Which rule would rule them out?

The red light that you see coming out of the mouse ("laser") is an LED that illuminates the surface for easier tracking. There are a few true laser mice out there that replace the LED with a laser and use a slightly different type of camera, however, these are few and far between (I can only think of 3 or 4 models).

My apologies - the models I have worked with had actual lasers.

Ether
02-08-2011, 14:35
Assuming that X0 and V0 are given, and assuming that the update period dt is short enough that the acceleration is accurately approximated as a linear function of time, then the position is given by:

X1 = X0 + dt*V0 + dt2*(a1 + 2*a0)/6

X2 = X1 + dt*V1 + dt2*(a2 + 2*a1)/6

.
.
.

Xn = Xn-1 + dt*Vn-1 + dt2*(an + 2*an-1)/6



I forgot to post the computation for Vn:

Vn = Vn-1 + dt*(an+an-1)/2