Re: Tracking fast moving objects with optical mice.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Interesting games...for now I just have time to answer short:

read mice.c from the source, especially read I_imps2 (init imps2),
I_ps2 and the M_imps2/M_ps2 function. This is what you need.

Possibly the other can answer more..

Nico

Tue, Feb 19, 2002 at 10:10:35PM +0100, Christian Melki:
> Hi, thought that this might be the place to turn for help.
> Im currently building robots to participate in robotic
> soccer this summer. We have some ideas of tracking
> our position with diffrent methods, like ultrasonic arrays
> and neural decision making. Some of them are implemented.
> and some are not.. Like this idea I have of using optical mice
> of tracking the ground and recieving dx,dy coords.
> I have written a small program that reads the mouse fd
> and outputs the dx, dy coords acoording to our needs..
> But after small scale testing I have encounterd several
> problems.
> 
> 1. The mouse doesn't seem to track the ground fast enough.
> If i move it _slowly_ across a surface i can get it to accurately 
> give me a dx-dy in metric format after scaling with resolution.
> But if i move it more a bit faster.. it seems to loose track of
> whats happening.. It recognizes a change.. and returns a 
> value accordingly.. But theese are close to a dx-dy of 0, 0
> instead of beeing a high value as an indication of a fast 
> motion. I have tested it with a budget optical  mouse as 
> well as an more expensive microsoft imps2 type.. 
> The results are the same.. I cant move nearly as fast as 
> I want.. Although the mice reportedly uses a 5000 
> samples/sec mechanism. I cant remember needing to move 
> this slowly on my mousepad when playing games.. Are
> there any ps2 specific options that im missing? Setting
> mouserate.. setting resolution..? Are there any imps2
> specific options to increase tracking abilities at high speeds?
> 
> 2. The init seems to be broken on most occations when
> initing the mouse.. More than half of the coordinates go
> "beserk", reporting 0-255  type movements.. And on a few
> occations everything seems ok.. All values are ok, no matter
> what surface or how long i run the mouse.. Seems very strange
> to me.. Any ideas of what i might be doing wrong?
> I have looked a bit at the gpm code.. albeit a bit to big and
> complex for me.. I have also looked at the svgalib mouse
> implementation.. 
> 
> In short.. I could use any tips and pointers I can get. :)
> Best regards.
> 
> Christian Melki
> MScE IT Stud.
> Uppsala University
> Uppsala, Sweden. 
> 
> _______________________________________________
> gpm mailing list
> gpm@xxxxxxxxxxxxxx
> http://lists.linux.it/listinfo/gpm
> 

-- 
Nico Schottelius

Please don't wonder, if you recieve answers to old mails from me.
I try to remove my huge backlog currently.

Attachment: pgp00007.pgp
Description: PGP signature


[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]