multiple USB mice data acquisition

Dear all,

I would like to acquire mouse position data from two USB mice at the same time, in a continuous fashion (e.g. for 10 seconds).
I am looking at GetInputState XOP, which looks like it could easily be modified to do this, but this seems to be limited to one mouse (even when I plug in two mice, it will just report the value of the "cursor").
I am also trying VDT2 operations, but this does not seem to recognize my usb mice at all. Instead it gives me only "bluetooth-incoming-port" and "bluetooth-modem" as available ports (using VDTPortList2).
Plus, I can't actually open two ports using the standard VDT2 GUI dialog (i.e. VDT settings). It gives me "error opening bluetooth-modem" [unix error 16: resource busy]

Anyone have any ideas?
Cheers,

Ruud



GetInputState uses OS calls that do not distinguish one mouse from another.

Mice do not appear as serial devices so you can't use VDT2. If you can find a mouse driver that makes it appear to be a serial device, you could use VDT2 but I have never heard of such a driver.

You would have to write your own XOP but even then I don't know how you would proceed. There may be OS calls that distinguish one mouse from another but I am not aware of them.
hrodstein wrote:
GetInputState uses OS calls that do not distinguish one mouse from another.

Mice do not appear as serial devices so you can't use VDT2. If you can find a mouse driver that makes it appear to be a serial device, you could use VDT2 but I have never heard of such a driver.

You would have to write your own XOP but even then I don't know how you would proceed. There may be OS calls that distinguish one mouse from another but I am not aware of them.




Dear hrodstein,
thanks again for your help.

With regard to GetInputState extension, do you think is there a way to "disengage" MousePosition from the coordinate systems (local and global)?

I would like to allow horizontal and vertical movement along the mouse sensor into infinity to track motion of an object that moves above the IR sensor of the mouse. The actual horizontal and vertical values wouldn't matter too much, since I can calibrate these to known distances travelled.

Thanks for any input.
Ruud

Quote:
With regard to GetInputState extension, do you think is there a way to "disengage" MousePosition from the coordinate systems (local and global)?


I'm not sure what this means. If you mean that you want to know how much the mouse is moved even it if hits the edge of the screen, then no, MousePosition can not do this. MousePosition calls an OS routine that returns the position of the mouse on the screen. I don't think the information that you are looking for, if I understand it, is available from normal OS mouse routines.
Yes, that is what I meant..
good to know that it cannot be done with Mouse position
The quest continues.

Cheers
Ruud
May I ask what is your experimental goal?
Maybe there is some other hardware device better suited than a mouse.

Thomas
thomas_braun wrote:
May I ask what is your experimental goal?
Maybe there is some other hardware device better suited than a mouse.

Thomas


Hi Thomas,

Actually, I am trying to build a infrared based motion tracker using infrared mice with as little adjustment to the mouse sensor as possible.
The aim is to accomplish something similar to what is described here: http://labrigger.com/blog/2011/05/27/destroying-the-curve/
I have tried some arduino driven ADNS sensors, but with mixed results.

Ruud
RJS wrote:
thomas_braun wrote:
May I ask what is your experimental goal?
Maybe there is some other hardware device better suited than a mouse.

Thomas


Hi Thomas,

Actually, I am trying to build a infrared based motion tracker using infrared mice with as little adjustment to the mouse sensor as possible.
The aim is to accomplish something similar to what is described here: http://labrigger.com/blog/2011/05/27/destroying-the-curve/
I have tried some arduino driven ADNS sensors, but with mixed results.

Ruud


This is the first thing comes into my mind when you mention tracking two mice. May I ask why you don't use matlab? It is the thing most people use in the field
After thinking about it, I wonder if you have a hardware not a software problem.

Have you considered to cannibalize the USB ends of the mice, feed the inputs in to a dual-port A/D converter, and read the data that way?

post edit: I just realized, a USB mouse is probably not a simple, one-channel I/O position -> intensity device.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville