Go to Post Your best friends are all team members and you could never live without any of them because robotics people are the best people. - Riverdance [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 22-12-2015, 07:19
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 62
phurley67 is an unknown quantity at this point
Motion Planning and sensor integration

First off I want to thank everyone involved in the Motion Planning presentation (http://www.chiefdelphi.com/forums/sh...otion+profile). I believe I understand the concepts and benefits well enough to explain it to our kids (which is always the hard part).

But I have a follow up question: when creating motion plans, we can determine our expected orientation, using a gyroscope we can tell if we are "on point" or not -- but should we use this extra information or rely solely on wheel encoders? Do you use a gyro and a similar motion planning process to automate a rotation or in practice do you find wheel encoders sufficient?

Perhaps to phrase the question in a different way, if my robot has both wheel encoders and gyroscope, and one sensor type does not match the other with respect to my calculated trajectory. Which do I trust or is there a smarter way to integrate all inputs into the motion plan?
  #2   Spotlight this post!  
Unread 22-12-2015, 08:04
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 809
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: Motion Planning and sensor integration

The answers to this question will vary a lot in the field of robotics. In FRC, however, your encoders are often your most reliable sensors on the bot. Proper execution of your motion planning and trajectory following software, with proper tuning, will get you a very consistent autonomous and should be all you need.

The proper answer to your question, however, is sensor fusion. Put simply, sensor fusion is the combination of multiple sensor signals into "one" signal through math and logic. For example, you could use your encoder values along with your robot's geometry to get your angle of rotation, and you could also integrate your gyro's angular acceleration values over time to get your angle of rotation. Through logic, you can then determine if these values are viable and then act upon them.

I would suggest simply relying on encoders in FRC, but if you want to implement sensor fusion, I suggest relying on your encoder values for actual robot movement and using your gyro for checks and balances. (For example, if your robot's wheels are not on the ground, your encoder values will still show the bot as moving, but your gyro will show no angular accelerations other than noise. From this, you can determine that your bot probably didn't move.)
__________________

Last edited by Ty Tremblay : 22-12-2015 at 10:15.
  #3   Spotlight this post!  
Unread 22-12-2015, 09:59
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: Motion Planning and sensor integration

If you're doing something similar to what 254 did in 2014, where you're planning ahead and creating a table of how far each wheel should have traveled and the heading of the robot at every point in time, I would recommend using a gyro.

Our team tried this last year, and I found that even though the encoders would stay on target during the path within a few percent of where they should be and ended within less than an inch of where they should, the robot would often be misaligned by more than 10 degrees at the end of an s-curve. It always turned less than it should.

One way to make this better was to generate a path for a robot that was an inch or two wider than the actual robot, so the wheels would rotate more during a turn. However, we found that there wasn't one width that would work well for every path - we had to guess and check to find different widths for different paths, which defeated the purpose of motion planning.

Our final solution was to use an additional PID controller for a gyro to keep the robot on the right heading. The gyro greatly increased our accuracy and also made the robot less vulnerable to oscillating/going off path when disturbed. The gyro never made it on our final robot because our path was simply a line, but if we did anything more than that, we would have used a gyro.
  #4   Spotlight this post!  
Unread 22-12-2015, 11:44
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 732
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: Motion Planning and sensor integration

Quote:
Originally Posted by Ty Tremblay View Post
I would suggest simply relying on encoders in FRC, but if you want to implement sensor fusion, I suggest relying on your encoder values for actual robot movement and using your gyro for checks and balances. (For example, if your robot's wheels are not on the ground, your encoder values will still show the bot as moving, but your gyro will show no angular accelerations other than noise. From this, you can determine that your bot probably didn't move.)
There has been an influx of very good gyros for FRC. Specifically the NavX is accurate over long periods of time, and even has a form of sensor fusion like you were talking about. It can be set up to rezero using the magnetometer when the robot stops moving. If you can afford it, using good gyro will give you a lot of improved performance over just using encoders.
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
  #5   Spotlight this post!  
Unread 22-12-2015, 11:50
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 809
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: Motion Planning and sensor integration

Quote:
Originally Posted by MichaelBick View Post
There has been an influx of very good gyros for FRC. Specifically the NavX is accurate over long periods of time, and even has a form of sensor fusion like you were talking about. It can be set up to rezero using the magnetometer when the robot stops moving. If you can afford it, using good gyro will give you a lot of improved performance over just using encoders.
Agreed. IMUs are much more reliable than gyros.
__________________
  #6   Spotlight this post!  
Unread 22-12-2015, 12:30
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,064
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Motion Planning and sensor integration

In practice, a decent gyro will provide a quicker and more accurate estimate of yaw rate and heading for a differentially steered robot than using wheel encoders. Wheel slip is unavoidable, hard to measure, and varies a lot as your robot accelerates, decelerates, and bounces across an imperfect floor.

There are still valid uses of the encoders for measuring your heading, though. If your encoders aren't moving, you can "hold" the gyro heading to prevent drift (this is most useful before the match starts). And if your encoders are estimating a drastically different yaw rate than the gyro, that's a good indication that the robot has become stuck and has lost traction.
  #7   Spotlight this post!  
Unread 22-12-2015, 12:27
Tom Bottiglieri Tom Bottiglieri is offline
Custom User Title
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,182
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Send a message via AIM to Tom Bottiglieri
Re: Motion Planning and sensor integration

Quote:
Originally Posted by phurley67 View Post
First off I want to thank everyone involved in the Motion Planning presentation (http://www.chiefdelphi.com/forums/sh...otion+profile). I believe I understand the concepts and benefits well enough to explain it to our kids (which is always the hard part).

But I have a follow up question: when creating motion plans, we can determine our expected orientation, using a gyroscope we can tell if we are "on point" or not -- but should we use this extra information or rely solely on wheel encoders? Do you use a gyro and a similar motion planning process to automate a rotation or in practice do you find wheel encoders sufficient?

Perhaps to phrase the question in a different way, if my robot has both wheel encoders and gyroscope, and one sensor type does not match the other with respect to my calculated trajectory. Which do I trust or is there a smarter way to integrate all inputs into the motion plan?
Buy a decent gyro and use that. While observing the encoders may work most of the time, there's a small probability that the wheels may slip or that your frame may twist and pull a wheel off the ground, leading to inaccurate measurements. You /should/ only ever have to drive straight and turn in place in a typical FRC autonomous mode.
__________________
Team 254 | San Jose, CA | Mentor (2010 - Present)
Team 125 | Boston, MA | College Student (2007 - 2011)
Team 195 | Southington, CT | Student (2002 - 2006)
  #8   Spotlight this post!  
Unread 22-12-2015, 13:22
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 62
phurley67 is an unknown quantity at this point
So practically speaking. If I were following a path, I would ideally generate my course correction using the encoders and then apply a second correction to my course using a navx or is there a smarter way?
  #9   Spotlight this post!  
Unread 22-12-2015, 14:08
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,064
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Motion Planning and sensor integration

Quote:
Originally Posted by phurley67 View Post
So practically speaking. If I were following a path, I would ideally generate my course correction using the encoders and then apply a second correction to my course using a navx or is there a smarter way?
Yeah, that's the basic approach.
  #10   Spotlight this post!  
Unread 22-12-2015, 17:31
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 62
phurley67 is an unknown quantity at this point
Re: Motion Planning and sensor integration

Thanks again for the great presentation and now for the extra pointers. Have a happy holiday and carefree kickoff.
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


All times are GMT -5. The time now is 09:06.

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