Go to Post However, the best responses come with patience. It might be a couple of days before you get a good answer or it could be 10 minutes. - Molten [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-01-2009, 16:40
groves groves is offline
Steve Liggett
None #1213 (Groves)
Team Role: Teacher
 
Join Date: Nov 2002
Rookie Year: 2003
Location: birmingham groves highschool
Posts: 80
groves is just really nicegroves is just really nicegroves is just really nicegroves is just really nicegroves is just really nice
optical mouse motion sensor thread

Throughout the years we have used a sensor to measure the distance that the robot moves. I have been playing with a couple of ideas to keep track of motion. My favorite idea is using an optical mouse I've found this information:

Cody's robot optical motion sensor

I have some general questions that we can all learn from:
  1. How do we connect to the CRio
  2. How do we program to utilize the information the motion sensor can give us.
  #2   Spotlight this post!  
Unread 04-01-2009, 21:06
Nibbles Nibbles is offline
Interstellar Hitchhiker
AKA: Austin Wright
FRC #0498 (Cobra Commanders)
Team Role: Alumni
 
Join Date: Jan 2008
Rookie Year: 2003
Location: Arizona
Posts: 103
Nibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really nice
Re: optical mouse motion sensor thread

This is something I have considered too (with mice, webcams, OpenCV, then various vision algorithms), but soon realized it was impractical because of the limitation of speed. Especially for mouse cameras, the resolution and (fast compared to standard video) framerate is too low for anything more then a foot per second (if you are lucky). Going back a generation of mice and using a ball/wheel with optical encoders is your best bet, and probably for the next few years. This years floor also poses a problem, there may not be enough contrast of the texture to track.
<ins>Wait, the floor is textured, so a good camera would be able to keep a lock on the floor texture with proper lighting. If you had a camera that could do the job.</ins>
__________________
Help standardize match data! Use the XML interchange format. (Specification page)
AAA_awright on Freenode IRC chat. (Join us at ##FRC on chat.freenode.net, or in your browser)

Last edited by Nibbles : 04-01-2009 at 23:24. Reason: The floor is in fact textured
  #3   Spotlight this post!  
Unread 04-01-2009, 21:13
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,006
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: optical mouse motion sensor thread

Quote:
Originally Posted by Nibbles View Post
framerate is too low for anything more then a foot per second (if you are lucky).
In a definitely unscientific experiment I wiggled my mouse about 6 inches at a rate of 'there-and-back' four times a second - about 4 FPS - and it seemed to track OK. Maybe it only tracked the ends (where I was moving slower as direction reversed). The link groves provided implied that it could be used - with modification - at fairly high (for a robot) speeds.
__________________

I am N2IRZ - What's your callsign?
  #4   Spotlight this post!  
Unread 05-01-2009, 00:31
Nibbles Nibbles is offline
Interstellar Hitchhiker
AKA: Austin Wright
FRC #0498 (Cobra Commanders)
Team Role: Alumni
 
Join Date: Jan 2008
Rookie Year: 2003
Location: Arizona
Posts: 103
Nibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really nice
Re: optical mouse motion sensor thread

Quote:
Originally Posted by Don Rotolo View Post
In a definitely unscientific experiment I wiggled my mouse about 6 inches at a rate of 'there-and-back' four times a second - about 4 FPS - and it seemed to track OK. Maybe it only tracked the ends (where I was moving slower as direction reversed). The link groves provided implied that it could be used - with modification - at fairly high (for a robot) speeds.
A better job then the mice I have access to (nothing fancy). My criteria was to have some tracking accuracy rate, report roughly the same velocity that is actually occurring , say, 99.9% of the time at max speed (20f/s). Anything less would mean that every few seconds it will report traveling in the wrong direction, enough to be problematic.

Looking at some of the more advanced mice (that I could find numbers for... seems like only marketing buzzwords like "LASER" and "OPTICAL" matter) can go up to 45in/s. Likely, since the playing surface grains (variance in contrast the mouse can lock onto) are larger then that on a mouse pad, you can pull back the mouse and shrink the size 4-6 times, so you could get up to 18 feet a second (or 35ft/s absolute best case if the tech specs are to be believed). But, you would have to find a USB to serial converter, and that mouse doesn't support PS/2 output (mice that do ship with a USB to PS/2 converter support the connection natively, the converter doesn't do any actual conversion of data). Take a really cheap computer with USB2.0 and serial, do some (quite a bit) of programming, and feed the results into the cRIO. And of course this is only theoretical, I haven't actually done any testing.
__________________
Help standardize match data! Use the XML interchange format. (Specification page)
AAA_awright on Freenode IRC chat. (Join us at ##FRC on chat.freenode.net, or in your browser)
  #5   Spotlight this post!  
Unread 05-01-2009, 08:08
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: optical mouse motion sensor thread

We did some experiments a few years back with using an optical mouse to track motion on the FRC carpet. Wildstang's programmers determined the hardware hacking necessary to connect directly to the chip inside the mouse, and came up with the code to use an IFI controller to communicate with it. We did the optical design so it could handle the expected travel speeds and view the surface without having to drag on the floor, and made a pneumatically-activated test jig to determine repeatability.

The electrical, optical, and programmatical aspects all worked great. However, without an absolutely stable distance between the floor and the sensor, converting mouse counts to absolute motion was unreliable. The values changed significantly with a difference in height of a single millimeter. A typical FRC robot bounces a lot more than that in normal operation.

With the slippery surface this year, maybe bouncing would be less of an issue -- except during collisions.
  #6   Spotlight this post!  
Unread 05-01-2009, 08:18
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,367
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: optical mouse motion sensor thread

I looked at this year's ago with led mice. Allot of mice use chip sets that you can't find any spec's on. Some logitech mice use Avago chip sets that have published interface data sheets. With out a USB port on the RC the interface is a problem. The communication protocol with the chip set is SPI. The faster mouse engines must have the code loaded into the mouse chip. It's complicated but do able. This is probably a case where a coprocessor would be good. The coprocessor could interface with the serial port or the SPI port and just send the cleaned up x and y data. In the end the problem is optical. The vertical height must stay with in a very close tolerance. Modifying the optics can be very difficult. It can be done but this is going to take allot of work. I got it working on a vex bot. How ever the chip set is now obsolete. Optically the laser mice are much more tolerant. A USB HID to serial converter might be a way to go.
  #7   Spotlight this post!  
Unread 05-01-2009, 09:26
edBringas edBringas is offline
Registered User
FRC #0743
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2004
Location: New York
Posts: 3
edBringas is an unknown quantity at this point
Re: optical mouse motion sensor thread

I went to a training hosted by Team 340, one of the beta testers of the new control system and remember be told that the new Jaguar motor controllers have built in encoders. Though it takes the fun out of making encoders it should save us some time

-Ed
  #8   Spotlight this post!  
Unread 05-01-2009, 09:33
Daniel_LaFleur's Avatar
Daniel_LaFleur Daniel_LaFleur is online now
Mad Scientist
AKA: Me
FRC #2040 (DERT)
Team Role: Engineer
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Peoria, IL
Posts: 1,967
Daniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond reputeDaniel_LaFleur has a reputation beyond repute
Send a message via MSN to Daniel_LaFleur
Re: optical mouse motion sensor thread

Quote:
Originally Posted by edBringas View Post
I went to a training hosted by Team 340, one of the beta testers of the new control system and remember be told that the new Jaguar motor controllers have built in encoders. Though it takes the fun out of making encoders it should save us some time

-Ed
Those encoders don't mean a thing if the wheels are spinning.
__________________
___________________
"We are not now that strength which in old days moved earth and heaven; that which we are, we are;
One equal temper of heroic hearts, Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield. "
- Tennyson, Ulysses
  #9   Spotlight this post!  
Unread 05-01-2009, 09:35
martin417's Avatar
martin417 martin417 is offline
Opinionated old goat
AKA: Martin Wilson
no team
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Buford, GA
Posts: 720
martin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond reputemartin417 has a reputation beyond repute
Re: optical mouse motion sensor thread

Quote:
Originally Posted by edBringas View Post
I went to a training hosted by Team 340, one of the beta testers of the new control system and remember be told that the new Jaguar motor controllers have built in encoders. Though it takes the fun out of making encoders it should save us some time

-Ed
There are no encoders built into the Jaguars. There is a micro that can read an encoder through the CAN bus, but use of the CAN bus is against the rules this year.
__________________
Former Mentor Team 1771
Former mentor Team 4509
  #10   Spotlight this post!  
Unread 05-01-2009, 09:48
edBringas edBringas is offline
Registered User
FRC #0743
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2004
Location: New York
Posts: 3
edBringas is an unknown quantity at this point
Re: optical mouse motion sensor thread

Good point on the spinning of the wheels Dan.
  #11   Spotlight this post!  
Unread 05-01-2009, 09:51
StevenB StevenB is offline
is having FRC withdrawal symptoms.
AKA: Steven Bell
no team
Team Role: College Student
 
Join Date: May 2005
Rookie Year: 2005
Location: Stanford, CA
Posts: 414
StevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond reputeStevenB has a reputation beyond repute
Re: optical mouse motion sensor thread

Quote:
Originally Posted by Nibbles View Post
My criteria was to have some tracking accuracy rate, report roughly the same velocity that is actually occurring , say, 99.9% of the time at max speed (20f/s).
I don't think 20 ft/sec will be necessary. In general maximum acceleration on the regolith will be ~1.6 ft/sec^2, meaning you'll be lucky to get over ~8ft/sec. This vastly reduces the change in focal length that is required. Some high-end mice might even be able to do it without any modification. On the other hand, there is still a robustness advantage to having the mouse more than a couple millimeters from the ground.

Interfacing one of the Avago (previously Agilent) mouse chips isn't extremely hard - I've done it before with my VEX controller. It requires only a digital IO pin and a bit of software. An oscilloscope and the datasheet go a long way.

Quote:
Originally Posted by edBringas View Post
I went to a training hosted by Team 340, one of the beta testers of the new control system and remember be told that the new Jaguar motor controllers have built in encoders. Though it takes the fun out of making encoders it should save us some time
-Ed
The Jaguars do not have built-in encoders. However, they do have support for a quadrature or analog encoder input. They have a microprocessor (more powerful than last year's controller) inside, which can run PID or other software. However, this is illegal this year per <R62>
Quote:
Originally Posted by Game Manual, Section 8, <R62>
Every speed controller, relay module, and servo shall be connected via PWM cable to the
Digital Sidecar, and be controlled by signals provided from the Mobile Device Controller via
the Digital Sidecar. They shall not be controlled by signals from any other source.
A. Support for the CAN bus port on the Jaguar speed controllers is prohibited for this
competition, and the port is not to be used. Nothing shall be connected to the CAN bus
port. It is recommended that the port be protected with a piece of tape to prevent debris
from entering the port.
__________________
Need a physics refresher? Want to know if that motor is big enough for your arm? A FIRST Encounter with Physics

2005-2007: Student | Team #1519, Mechanical Mayhem | Milford, NH
2008-2011: Mentor | Team #2359, RoboLobos | Edmond, OK
2014-??: Mentor | Looking for a team...
  #12   Spotlight this post!  
Unread 21-01-2009, 08:16
nickec nickec is offline
Registered User
no team
 
Join Date: Jan 2009
Location: USA
Posts: 2
nickec is an unknown quantity at this point
Re: optical mouse motion sensor thread

Quote:
Originally Posted by Alan Anderson View Post
We did some experiments a few years back with using an optical mouse to track motion on the FRC carpet. Wildstang's programmers determined the hardware hacking necessary to connect directly to the chip inside the mouse, and came up with the code to use an IFI controller to communicate with it. We did the optical design so it could handle the expected travel speeds and view the surface without having to drag on the floor, and made a pneumatically-activated test jig to determine repeatability.

The electrical, optical, and programmatical aspects all worked great. ...
I am hoping to use a laser mouse as a data acquisition sensor. A sub-revolution tachometer. Does this sound feasible?
  #13   Spotlight this post!  
Unread 21-01-2009, 10:27
Tristan Lall's Avatar
Tristan Lall Tristan Lall is offline
Registered User
FRC #0188 (Woburn Robotics)
 
Join Date: Aug 2001
Rookie Year: 1999
Location: Toronto, ON
Posts: 2,484
Tristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond reputeTristan Lall has a reputation beyond repute
Re: optical mouse motion sensor thread

Quote:
Originally Posted by nickec View Post
I am hoping to use a laser mouse as a data acquisition sensor. A sub-revolution tachometer. Does this sound feasible?
No, at least not for FRC. Lasers are banned, without regard to the power output or the function.
  #14   Spotlight this post!  
Unread 21-01-2009, 11:30
nickec nickec is offline
Registered User
no team
 
Join Date: Jan 2009
Location: USA
Posts: 2
nickec is an unknown quantity at this point
Re: optical mouse motion sensor thread

Quote:
Originally Posted by Tristan Lall View Post
No, at least not for FRC. Lasers are banned, without regard to the power output or the function.
I apologize for not making clear that I am not a robot competition team member. I am an amateur scientist. When I saw the post involving optical mice, which predate laser mice, I was hoping to ask some questions of anyone who has done the kind of hardware and software work necessary to use a laser mouse for data acquisition.

The poster seemed to be saying that this work had been done. Namely direct hardware interface with the mouse DSP.
  #15   Spotlight this post!  
Unread 21-01-2009, 11:40
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: optical mouse motion sensor thread

Quote:
Originally Posted by nickec View Post
I apologize for not making clear that I am not a robot competition team member yet. I am an amateur scientist.
Nick -

I fixed your post for you. I'm sure that after looking around here a bit you'll find yourself joining or starting a team. There are a lot of interesting people and interesting ideas on this forum, and we are glad that you are joining it.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optical Mouse Navigation phrontist Programming 60 14-03-2005 21:48
External Lens for optical mouse gnormhurst Electrical 4 07-01-2005 19:07
Optical Mouse / Ball Mouse Clark Gilbert Chit-Chat 26 22-07-2004 13:17
optical sensor majormusic2005 Technical Discussion 1 29-01-2003 07:39
optical sensor archiver 2001 3 24-06-2002 02:55


All times are GMT -5. The time now is 16:35.

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