Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 2 3 4 5 
Send Topic Print
Adding optical mouse sensor for dead reckoning (Read 54502 times)
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #45 - 08/29/08 at 12:32am
 
Yeah works just fine, just needed to add a TRUE in there to make it treat them as signed numbers.
 
Now I am working on what I really like Smiley , the whole system and how it will be working with reading from the optical sensor.
 
As for the mounting I did some thinking. I am gonna go with making two wholes and mounting it with nuts and bolts so it can be modular just in case something happens. A lot better than epoxy I think Tongue.
 
I have like 3 spare sensors now. Bought because I thought this one was broken or something due to the difficulty in reading from it Smiley
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #46 - 09/08/08 at 2:04am
 
It is going very well. I have almost finalized the "drivers" of sorts for the optical sensor. Even though I am a little stalled by my temporary battery which needs re-charging every 1.5 hour or so the optical sensor is communicating with the robot and is also mounted on it.
 
I added a small function to turn chars(saved in two-complements form from the sensor) to int, since I can do calculations with two complements but up to the value of +-128. Now all that remains is the timing of the readings from the sensor and all the other actions of my application, but that I guess is application specific. When I have a final final version of the drivers(well just one header file and one .c file) I will edit my first post.
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #47 - 09/18/08 at 10:56am
 
I tried to edit the first post but unfortunately I couldn't. I am including here the two files, one header file and one source file with which you can communicate with the ADNS2610 sensor.
 
Here is the header file
Here is the source file
 
If you have any questions or even better any suggestions for improvement to these drivers please tell me.
 
In addition I would like to ask people who have integrated such a sensor to their robots (spikey? Smiley  ) how did they use them.
 
For example I managed to make the robot make perfect turns, and measure the distance travelled. Only thing I thought I could manage to accomplish and haven't managed so far is making it go 100% straight all the time. And that is because small difference to the Y axis (left-right) happen no matter what, the sensor is VERY sensitive.  
    Even if you make a routine which will alter motor power to turn slightly trying to keep all of deltaY at zero this will result in a very strange kind of NOT going straight motion. So I concluded that it would be better to let the robot go off a little at going straight and then calculate the off difference and correct after said distance has been travelled.
 
Please do share your insight on the matter Smiley
 
EDIT: And something I forgot. Those who have already tried to integrate an optical sensor with the robot ... do you have any idea what is the way of measurement it uses? It doesn't say anything in the datasheet.
 
After letting the bot run a few times I think by experimentation alone that 1000 of whatever the optical sensor is counting with is about 8cm.
 
EDIT2: As for those 2 files. They use a math.h. It is just another header with a power and a sqrt function. And that is only used for the function which turns the signed chars (two complements) to ints.
Back to top
 
« Last Edit: 09/18/08 at 12:08pm by Lefteris »  

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Adding optical mouse sensor for dead reckoning
Reply #48 - 09/18/08 at 11:19am
 
Thanks for posting this.  There is probably a lot of vibration because of the bumps on the tank treads, and because the sensor is so sensitive, it is picking this up.  I'm have the same problem with the stereo camera, which picks up a lot of jitter in the picture between left and right because of the tread bumps.  I suspect the optimal configuration would use two of the optical sensors so that the motion of each track could be computed separately.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
spikey
YaBB Newbies
*




Posts: 43
Re: Adding optical mouse sensor for dead reckoning
Reply #49 - 09/18/08 at 2:07pm
 
I'm using a very similar sensor, the ADNS-3080 wich is just a newer version of ADNS-2610. So far I have only been using it on a temporary circuitboard to test it's performance, but I am going to mount it on my mobile tank that will make a map of it's surroundings with the help of ultrasonic sensors, optical mouse sensor (maybe 2 for rotation, untested) and a electronic compass. I might throw in some visual tracking as well if there is time otherwise the camera (mounted on a pan/tilt turret will be used for target tracking. Here's a picture
 
The datasheet for ADNS-2610 says it has a 400cpi (counts per inch) if your results differ alot from this I would guess it's because the image is abit out of focus. A few tenths of a mm can change the SQUAL (Surface QUALity) value quite alot which may affect the number of counts.
Back to top
 
 
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #50 - 09/18/08 at 3:05pm
 
Wow ... your tank looks quite impressive!
 
As for the cpi ... I noticed it but thought it was some abbreviation that was not of my concern. Guess I was wrong. BUT! That is good. Since that means .... 1000counts = 6.35 cm . And this agrees with my results ... to a degree.
 
Problem is that it all depends on the nature of the material the robot is traversing. For example ... cardboard paper needs more counts for the same actual distance. Which means I need to calibrate the robot before each use in different terrain.
 
Ultrasonic sensors? That sounds neat! I am going for just mapping of a maze or even some small controlled environment and solving graph search problems inside said environment. So I guess the optical sensor and visual processing will have to suffice(deadline for my undergrad thesis approaching *cough*  *cough*).
 
@admin: Yes the difference in values should be due to this vibration. Still I think that there might be a way to contain the problem by using simultaneous visual processing. For example check if you have gone far off course and correct according to your deltaY.  
   Something else which can be tried is to accumulate the deltaY(right-left) until it passes a threshold. Then and only then turn to correct your trajectory. Since as I said above trying to update the motors at real time to make the deltaY stay close to zero is really harder than it sounds and results to a bumpy ride.
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
PhaseSpace
Junior Member
**




Posts: 67
Re: Adding optical mouse sensor for dead reckoning
Reply #51 - 09/21/08 at 7:47pm
 
Some fantastic work here!
 
I plan on adding this feature to my srv as well.  
 
If there are any updates or additions to this project, please post it.
Back to top
 
 
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #52 - 09/22/08 at 6:31am
 
Actually yes there is. A warning about surfaces.
 
I spent the whole morning today trying to understand why the sensor was not giving accurate readings on a new surface I placed the robot today.  I thought that calibrating the sensor for each different surface would be enough.  The problem with this surface was that it was too shiny, and the readings it gave back were completely inaccurate.
 
For example : First run :   10cm = 38 sensor counts
                    Second run:  10cm = 500sensor counts.
 
I could not get accurate readings to know how much I have travelled in this terrain. So I just put a cardboard paper above the surface and all goes well now. I would have just blamed it on the surface if my mouse couldn't move on it. But it can! That's what has gotten me thinking. Why does my mouse(same sensor) move well on the surface while the robot sensor gives inaccurate readings? Only thing I can think of is motor noise but we got that at all the other surfaces which went well.
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
spikey
YaBB Newbies
*




Posts: 43
Re: Adding optical mouse sensor for dead reckoning
Reply #53 - 09/23/08 at 12:33am
 
The only thing I can come up with is that the sensor is not on the optimal height from the ground. The datasheet specifies that the bottom of the sensor should be 7.45mm from the surface. See the graphs on page 11 for more info.
 
Have you tried using a white paper as a surface? does it give any result?
if it does, the height should be ok. I think...
Back to top
 
 
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #54 - 09/23/08 at 2:55am
 
Yeah it gives okay results in almost all surfaces, EXCEPT that one I tried to use for the labyrinth panel ... I changed it to a more rought surface and now it is okay.
 
The height from the ground is optimal, since it is exactly the same as it was when the sensor was in the mouse :p
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
spikey
YaBB Newbies
*




Posts: 43
Re: Adding optical mouse sensor for dead reckoning
Reply #55 - 09/23/08 at 12:19pm
 
well, then I think you're ahead of me with the experiments  Smiley
Back to top
 
 
  IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #56 - 09/26/08 at 7:28am
 
I would like to add something about the mounting. The way I mounted has the very nice advantage of being the same distance from the ground as when it was a mouse(good old days :p).  
 
BUT it has a big disadvantage. For some reason some times, something happens and I am getting negative values in the register instead of getting positive ones as it was supposed to be giving me. I suspect that this is due to turbulence from the motors. Can't explain it any other way. And since I want to measure distances with a reasonable amount of precision but not too precise I figured that I should somehow get rid of these negative values.
 
Problem is that once they start coming they stay negative for many milliseconds. Something which gives me the idea that getting shaken due to the motors must be causing it to think it is going the other way sometimes.  
 
The only solution I could find was to add a small check. If it found negative values when it was going straight it waited for a few milliseconds (with motors off) until the sensor lost sync with the processor and then it restarted asking for dX values(goign straight values).  
 
This gives me accurate measurements over long distances, but it also makes the robot stop for fractions of a second sometimes(when it has negative values).
 
Just a warning to others who are trying this. If you got any better ideas please share them! Smiley
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
abotics
Junior Member
**




Posts: 97
Re: Adding optical mouse sensor for dead reckoning
Reply #57 - 09/26/08 at 10:05am
 
Have you tried adding decoupling caps to your motors? You may want to add a total of 3-ceramic caps to each motor. One across the two motor leads, one from motor lead#1 to the motor body and one from motor lead#2 to the motor body.
 
-Abe
Back to top
 
 
Email WWW   IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: Adding optical mouse sensor for dead reckoning
Reply #58 - 09/26/08 at 10:09am
 
There are already decoupling caps across the motor leads at the motor control/radio board.  It seems unlikely that electrical noise as a source of the problem, but I would not be surprised if there is a mechanical issue, given the sensitivity of the sensor and the irregular motion induced by the bumps on the robot treads.
Back to top
 
 

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Lefteris
Senior Member
****




Posts: 274
Re: Adding optical mouse sensor for dead reckoning
Reply #59 - 09/26/08 at 11:44am
 
Yeah that is what I meant. Sorry english is not my first language, I meant that bumps from the motors must lead to irregular motion , and said motion must somehow confuse the sensor since it is too sensitive.
Back to top
 
 

http://www.realintelligence.net - The real intelligence project || http://lefteris.realintelligence.net - My blog
  IP Logged
Pages: 1 2 3 4 5 
Send Topic Print