Go to Post So take it all with a grain of salt, form your own opinions, lead by example, act responsibly, be graciously professional, and everything will be ok. - LauraN [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 25-01-2015, 00:42
Joshua Sicz Joshua Sicz is offline
Registered User
FRC #2403
 
Join Date: Jan 2014
Location: Mesa, Arizona
Posts: 29
Joshua Sicz is an unknown quantity at this point
Re: Realistic Velocity Calculation

Quote:
Originally Posted by Spoam View Post
You can find the velocity by numerically integrating the acceleration values (e.g. trapezoid sum them, or continuously add the acc value*time step). This is probably very imprecise though, so I would test it empirically and not have anything vital depend on those values.
This is exactly what we have been doing. It doesn't give us anything useful, yet... By yet I mean is the accelerometer is giving us really weird data and the reason why is explained in an earlier post.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2015, 08:51
Michael Hill's Avatar
Michael Hill Michael Hill is offline
Registered User
FRC #3138 (Innovators Robotics)
Team Role: Mentor
 
Join Date: Jul 2004
Rookie Year: 2003
Location: Dayton, OH
Posts: 1,572
Michael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond reputeMichael Hill has a reputation beyond repute
Re: Realistic Velocity Calculation

Quote:
Originally Posted by Caleb Sykes View Post
Not quite an optical mouse, but I know that a couple of teams have mounted unpowered omni wheels beneath their robot that are connected to encoders in order to measure distance. Syncing the data with this with an angular measurement could then determine velocity and position. I think I remember 111 doing something like this last year, but I am unable to find the thread describing it.
We did this on my high school team (45) back in 2004(?). I think we had white tape strips on black wheels for a primitive encoder.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2015, 14:27
Mike Marandola Mike Marandola is offline
Lead Bumper Mentor
AKA: Mike Marandola
FRC #0316 (Lunatecs)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Pedricktown, NJ
Posts: 659
Mike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond reputeMike Marandola has a reputation beyond repute
Re: Realistic Velocity Calculation

Quote:
Originally Posted by Caleb Sykes View Post
Not quite an optical mouse, but I know that a couple of teams have mounted unpowered omni wheels beneath their robot that are connected to encoders in order to measure distance. Syncing the data with this with an angular measurement could then determine velocity and position. I think I remember 111 doing something like this last year, but I am unable to find the thread describing it.
33 used omnis for odometry last year but I heard they didn't use them later on in the season.
__________________

2015 - Pioneer Valley District Finalists/Upper Darby District Finalists/MAR District Championship #1 Seed and Winners with 225 and 203
2014 - Lenape Seneca District Winners/Chestnut Hill District Winners
2013 - Lenape Seneca District Winners/Chestnut Hill District Finalists
2011 - Philadelphia Regional Finalists
2009 - Finger Lakes Regional Finalists

Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2015, 08:14
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Realistic Velocity Calculation

Quote:
Originally Posted by GeeTwo View Post
HMMM.. I wonder if anyone has ever implemented an optical mouse solution applied to the carpet beneath an FRC robot...you'd need to use two of them in different locations to also measure rotation, but it'd be a great way to know if you lost traction. Oh, well - not my problem this year; shove it into the "off-season projects" folder, er, file cabinet.
we are mounting 4 Vex 2.75" omni-wheels with encoders, 2 for x, 2 for y (on wheel in each corner). achieved x = (x1+x2)/2, achieved y = (y1+y2)/2 and achieved r = ((x1-x2)+(y1-y2))/2. Built frame yesterday, mounting "pedometers" Monday.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2015, 10:44
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,071
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Realistic Velocity Calculation

Quote:
Originally Posted by gpetilli View Post
we are mounting 4 Vex 2.75" omni-wheels with encoders, 2 for x, 2 for y (on wheel in each corner). achieved x = (x1+x2)/2, achieved y = (y1+y2)/2 and achieved r = ((x1-x2)+(y1-y2))/2. Built frame yesterday, mounting "pedometers" Monday.
Let's chat about this offline.


Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2015, 08:52
RunawayEngineer RunawayEngineer is offline
Master Commander of All Things Tech
AKA: Ches
FRC #0801 (Horsepower)
Team Role: Tactician
 
Join Date: Apr 2014
Rookie Year: 2003
Location: Merritt Island
Posts: 66
RunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to beholdRunawayEngineer is a splendid one to behold
Re: Realistic Velocity Calculation

Quote:
Originally Posted by GeeTwo View Post
HMMM.. I wonder if anyone has ever implemented an optical mouse solution applied to the carpet beneath an FRC robot...you'd need to use two of them in different locations to also measure rotation, but it'd be a great way to know if you lost traction. Oh, well - not my problem this year; shove it into the "off-season projects" folder, er, file cabinet.
Preface for younger CD'ers: computer mice used to work by rolling on a ball that would allow it to sense movement by its rotation.

I haven't heard of a team using an optical mouse, but I do vaguely remember a swerve drive team that used a mouse-ball to track it's position in autonomous way back in 2008. I didn't catch which team it was, unfortunately.
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2015, 09:57
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,112
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: Realistic Velocity Calculation

Quote:
Originally Posted by RunawayEngineer View Post
I haven't heard of a team using an optical mouse,...
WildStang and the TechnoKats collaborated on an odometer experiment using optical mice a decade ago. We determined two things. First, optical mice (at the time) were not capable of keeping up with the velocity of a typical FRC robot. Second, trying to use lenses to focus on the carpet from a few inches away in order to scale the velocity down to something the mouse sensor can handle does not work reliably. The scale varies with height and even a couple of millimeters of bounce throws off the measurements enough for them to be less accurate than a simple wheel speed encoder, even with the wheel slipping.

It's possible that modern mice are more able to track high speed motion.
Reply With Quote
  #8   Spotlight this post!  
Unread 23-01-2015, 23:17
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,605
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Realistic Velocity Calculation

Quote:
Originally Posted by Joshua Sicz View Post
I have been helping out our student programmers on our team and we haven't found a good why to calculate velocity. We have a accelerometer that gives us reading in g's. So we just convert it to ft/s^2 and then take the timedifference between that last time the code was ran to calculate velocity. But what we are finding is the accelerometer doesn't give us consistent values.

Does any team have experience in this? Anything would help thanks!
In order to even have a chance at making this work, you would also need a gyroscope. At each time step, you would have to rotate the previous time step's x and y by the amount of angle you've turned (theta), then add the change in speed. Assuming x is to the right and y is forward, and theta is rotation to the right, you'd have to do:
  • ynew = yold*cos(theta) + xold*sin(theta) + yacc*rdelta
  • xnew = xold*cos(theta) - yold*sin(theta) + xacc*tdelta

This is known as inertial navigation, and you can very quickly get lost in the intricacies if you're actually trying to use it for more than a few seconds, or in more than two dimensions, or across more than an area the size of, say, an FRC arena. Even staying in a 27-foot square box and limiting yourself to 2 minutes and 30 seconds, it would probably be a good idea to have a "reset" button that you can hit when the robot is actually stopped that sets both values to zero.
Reply With Quote
  #9   Spotlight this post!  
Unread 23-01-2015, 23:35
hexane hexane is offline
Assistant Project Manager (Student)
AKA: Colin
FRC #2062 (C.O.R.E. 2062)
Team Role: Mechanical
 
Join Date: Jun 2013
Rookie Year: 2012
Location: Waukesha, Wisconsin
Posts: 9
hexane is a glorious beacon of lighthexane is a glorious beacon of lighthexane is a glorious beacon of lighthexane is a glorious beacon of lighthexane is a glorious beacon of light
Re: Realistic Velocity Calculation

Quadrature Encoders are probably the most accurate way to tell distance. To figure out velocity, make a variable that you set to the position of the encoder at the end of a program cycle, then figure out the change in position divided by the change in time.
__________________
What do you mean, "our code is too complex?"
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2015, 01:13
Joshua Sicz Joshua Sicz is offline
Registered User
FRC #2403
 
Join Date: Jan 2014
Location: Mesa, Arizona
Posts: 29
Joshua Sicz is an unknown quantity at this point
Re: Realistic Velocity Calculation

Quote:
Originally Posted by GeeTwo View Post
In order to even have a chance at making this work, you would also need a gyroscope. At each time step, you would have to rotate the previous time step's x and y by the amount of angle you've turned (theta), then add the change in speed. Assuming x is to the right and y is forward, and theta is rotation to the right, you'd have to do:
  • ynew = yold*cos(theta) + xold*sin(theta) + yacc*rdelta
  • xnew = xold*cos(theta) - yold*sin(theta) + xacc*tdelta

This is known as inertial navigation, and you can very quickly get lost in the intricacies if you're actually trying to use it for more than a few seconds, or in more than two dimensions, or across more than an area the size of, say, an FRC arena. Even staying in a 27-foot square box and limiting yourself to 2 minutes and 30 seconds, it would probably be a good idea to have a "reset" button that you can hit when the robot is actually stopped that sets both values to zero.
Awesome! We have actually played around we this exact thing this season and have got it to work with exactly they way you have said it to be done. Now I just need to get velocity from the x and y direction relative to the frame. Getting the code to output a realistic velocity because we get random numbers out of the accelerator.
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 09:28.

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