Go to Post it should not matter the gender of a person but rather their ability. - vivek16 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2015, 23:35
Altainia Altainia is offline
That one geeky guy...
FRC #5098 (Sting-R)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Kansas City, MO
Posts: 18
Altainia will become famous soon enoughAltainia will become famous soon enough
I got it to work! USB mice

It has come full circle. Years ago I joined this forum as a student with the sole goal to learn how to get optical mice to work with the microcontroller we had at the time. Now, seven years later and back on board as a mentor, (and with the new roboRIO having USB ports) I can finally say I GOT IT!

So here's a video tutorial I made. I included links to the necessary files in the dooblydoo.

https://www.youtube.com/watch?v=Aup6CQv_-j4
Reply With Quote
  #2   Spotlight this post!  
Unread 20-02-2015, 00:07
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 511
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: I got it to work! USB mice

Very interesting. The idea to use a wireless mouse to control the robot, correct? Am I correct to assume this wouldn't be for competition use.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-02-2015, 01:13
Altainia Altainia is offline
That one geeky guy...
FRC #5098 (Sting-R)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Kansas City, MO
Posts: 18
Altainia will become famous soon enoughAltainia will become famous soon enough
Re: I got it to work! USB mice

No. It's to put a hardwired optical mouse on the robot for position tracking.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-02-2015, 01:17
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 511
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: I got it to work! USB mice

I'm assuming the mouse would read the carpet then as move around. Then using the equation you stated you could tell how far away you are from your starting position?
Reply With Quote
  #5   Spotlight this post!  
Unread 20-02-2015, 01:40
Altainia Altainia is offline
That one geeky guy...
FRC #5098 (Sting-R)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Kansas City, MO
Posts: 18
Altainia will become famous soon enoughAltainia will become famous soon enough
Re: I got it to work! USB mice

Exactly.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-02-2015, 12:26
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 511
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: I got it to work! USB mice

So it reads in pixels then you'd divid it by your dpi. How accurate is it?
Reply With Quote
  #7   Spotlight this post!  
Unread 20-02-2015, 12:46
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 544
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: I got it to work! USB mice

Quote:
Originally Posted by tomy View Post
How accurate is it?
I'd also like to know... In my experience most mouse only maintain about 95% accuracy (meaning that the same motion repeated an infinite number of times will have a 5% deviance in delta distance). At the start of the season I expected to integrate the accelerometer to obtain velocity, but it's noise is horrendous. If the mouse gets good data, than it might be a good option.

Also, whats the issue with
Code:
MouseInfo.getPointerInfo().getLocation().x

Last edited by Arhowk : 20-02-2015 at 12:51.
Reply With Quote
  #8   Spotlight this post!  
Unread 20-02-2015, 12:54
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 511
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: I got it to work! USB mice

This would be used to replace the gyro then? How close to the ground does the mouse have to be?
Reply With Quote
  #9   Spotlight this post!  
Unread 20-02-2015, 15:31
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,733
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: I got it to work! USB mice

This is a pretty awesome achievement. Position this guy at the center of rotation, and the measurement is very precise. Do you know if it works on the HDPE surface of the scoring platform? I know mice tend to go crazy if used on glass, or sometimes even an overly-polished conference room table.
Reply With Quote
  #10   Spotlight this post!  
Unread 20-02-2015, 16:08
Altainia Altainia is offline
That one geeky guy...
FRC #5098 (Sting-R)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Kansas City, MO
Posts: 18
Altainia will become famous soon enoughAltainia will become famous soon enough
Re: I got it to work! USB mice

Quote:
Originally Posted by Arhowk View Post
I'd also like to know... In my experience most mouse only maintain about 95% accuracy (meaning that the same motion repeated an infinite number of times will have a 5% deviance in delta distance). At the start of the season I expected to integrate the accelerometer to obtain velocity, but it's noise is horrendous. If the mouse gets good data, than it might be a good option.
I don't yet know how accurate it is. We are printing a plastic board to hold the circuitry to better mount it on a practice bot. I'll update this thread with how well it works once we know. However, the manufacturer claims it can detect speeds up to 10 feet/sec and has a resolution of 1000 pixels per inch. When leaving it stationary on carpet similar to competition carpet, it had an error of about 1 pixel (or 1/1000 in) every five minutes. This was not rigorously tested.

Quote:
Also, whats the issue with
Code:
MouseInfo.getPointerInfo().getLocation().x
Two issues: first, that requires a screen to be set up as the pointer only exists with a display. That would have been possible to do (set up a dummy XServer on the roboRIO) but you would have to constantly reset the pointer's position each time you got its location as once it reaches the end of the imaginary screen, it wouldn't go any further. That was something I was prepared to do as well if this didn't pan out, but getting the raw data seemed more elegant to me.

Quote:
Originally Posted by tomy View Post
This would be used to replace the gyro then? How close to the ground does the mouse have to be?
One mouse could not replace the gyro as it only measures linear distance. However, two mice (and there are two USB ports) could replace the gyro. That is our intention if this ends up working reliably (see above). As far as distance to the ground, pretty close. It's a gaming mouse, so it was designed to not register anything if it's more than even a quarter of an inch off the ground (so that a gamer could move the mouse forward for a game and pick it up to reset it on their mouse pad without redacting the action they just made in game), so we're using a smooth and curve-ended plastic board for it to slide on with springs holding it to the ground. The springs will hopefully allow it to slide up the ramps.

Quote:
Originally Posted by JesseK View Post
This is a pretty awesome achievement. Position this guy at the center of rotation, and the measurement is very precise. Do you know if it works on the HDPE surface of the scoring platform? I know mice tend to go crazy if used on glass, or sometimes even an overly-polished conference room table.
Putting it at the center of rotation does not need to be done if two mice are used to get actual rotation. However, lining them up along the robot's x and y axis will be the challenge, considering the resolution this mouse has...
I do not know if it will work on the scoring platform. All it needs is imperfections on the surface at least 1/500th of an inch for it to work. Even if not, the main purpose of this was to drive precisely in auto, and we can just tell it to go around.
Reply With Quote
  #11   Spotlight this post!  
Unread 20-02-2015, 18:49
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 544
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: I got it to work! USB mice

hm. The only issue I see is sensor distance. I have a laser mouse with me ATM and I can only hover it ~1cm above the mousepad for it to pick up, any higher and the cursor doesn't move. How far above the carpet does your team plan to mount your mouse? My biggest fear would be chipping the mouse when going over the bump
Reply With Quote
  #12   Spotlight this post!  
Unread 20-02-2015, 23:16
Altainia Altainia is offline
That one geeky guy...
FRC #5098 (Sting-R)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Kansas City, MO
Posts: 18
Altainia will become famous soon enoughAltainia will become famous soon enough
Re: I got it to work! USB mice

Quote:
Originally Posted by Arhowk View Post
hm. The only issue I see is sensor distance. I have a laser mouse with me ATM and I can only hover it ~1cm above the mousepad for it to pick up, any higher and the cursor doesn't move. How far above the carpet does your team plan to mount your mouse? My biggest fear would be chipping the mouse when going over the bump
We're making a custom base for the mouse's circuitry to rest on and using springs to keep it to the ground while allowing it to rise up on the bump. It also cannot be too far from the ground. Also, we're using an optical mouse, though that doesn't matter too much.
Reply With Quote
  #13   Spotlight this post!  
Unread 07-10-2015, 12:24
sraque's Avatar
sraque sraque is offline
Registered User
AKA: Steve Raque
FRC #2614 (MARS)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2009
Location: Morgantown, WV
Posts: 93
sraque is on a distinguished road
Re: I got it to work! USB mice

We are looking at options for tracking position ahead of next build season. Can you share how you physically mounted the mouse (pics), and any performance information you gained this season (how well it worked)?

Thanks!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi