If you have a problem with a team, go to that team and address it with them. Don't air your slanderous opinions here for all to see. - Andy Baker [more]
 Chief Delphi Uses of the kalman filter in FRC
 CD-Media CD-Spy
 portal register members calendar search Today's Posts Mark Forums Read FAQ rules

#1
08-11-2018, 12:11 PM
 AmoryG Registered User FRC #2423 (KwarQs) Team Role: Alumni Join Date: Mar 2008 Rookie Year: 2008 Location: Watertown, MA Posts: 231
Uses of the kalman filter in FRC

I'm studying the kalman filter and I'm wondering if teams can provide examples of how they used it in competition as well as the code if you're willing to share. I'm primarily interested in seeing examples of how it was used for estimating the position of the robot, although other use cases are welcome too.
__________________
KwarQs 2423

2008 Boston Regional Rookie Allstars

http://whsrobot.blogspot.com/
#2
08-11-2018, 01:32 PM
 calcmogul WPILib Developer AKA: Tyler Veness FRC #3512 (Spartatroniks) Team Role: Mentor Join Date: Nov 2011 Rookie Year: 2012 Location: Santa Maria, CA Posts: 108
Re: Uses of the kalman filter in FRC

I actually wrote a thing recently that paraphrases the course I took at university on Kalman filter theory. See the "Stochastic control theory" chapter of https://file.tavsys.net/control/state-space-guide.pdf. Basically all the things I would have written here are already there. It has an example of a robot driving between two walls. The Kalman filter estimates the position of the robot from noisy range measurements ahead of and behind the robot.

The plots of the robot position etc. over time are generated using Python and the relevant Kalman filter equations. The Python source is in https://github.com/calcmogul/state-s...ee/master/code.

For FRC purposes, you typically find the steady-state Kalman gain and plug the matrices into a Luenberger observer instead, so it estimates states for a state-space controller. The controller isn't necessary though if you just want odometry.
__________________

Last edited by calcmogul : 08-11-2018 at 01:36 PM.
#3
08-11-2018, 02:35 PM
 CarlosGJ 418 alumnus, 696 mentor AKA: Carlos Gross Jones FRC #0696 (Circuit Breakers) Team Role: Mentor Join Date: Feb 2011 Rookie Year: 2009 Location: La Canada Flintridge, CA Posts: 52
Re: Uses of the kalman filter in FRC

If you want to jump on the ROS train, there are existing nodes which implement Kalman filters to estimate robot position and orientation: http://wiki.ros.org/robot_pose_ekf
#4
08-11-2018, 05:22 PM
 kylelanman Programming Mentor AKA: Kyle FRC #2481 (Roboteers) Team Role: Mentor Join Date: Feb 2008 Rookie Year: 2007 Location: Tremont Il Posts: 246
Re: Uses of the kalman filter in FRC

I've been dabbling in kfs this off season and have found this open source book to be a really easy read. The interactive nature of the notebooks is also a beneficial.

https://github.com/rlabbe/Kalman-and...ters-in-Python

The Udacity Artificial Intelligence for Robots is also a good free resource and has an entire unit on kfs.

https://www.udacity.com/course/artif...obotics--cs373
__________________

"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Last edited by kylelanman : 08-11-2018 at 08:30 PM. Reason: Added course link
#5
08-13-2018, 02:25 PM
 Citrus Dad Business and Scouting Mentor AKA: Richard McCann FRC #1678 (Citrus Circuits) Team Role: Mentor Join Date: May 2012 Rookie Year: 2012 Location: Davis Posts: 1,285
Re: Uses of the kalman filter in FRC

There's an extensive discuss of the use of Kalman filters for control in this thread: https://www.chiefdelphi.com/forums/s...d.php?t=165579
__________________

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     User Announcements FIRST     General Forum         FIRST E-Mail Blast Archive     Rumor Mill     Career     Robot Showcase Technical     Technical Discussion     Robotics Education and Curriculum     Motors     Electrical         CAN     Programming         NI LabVIEW         C/C++         Java         Python     Control System         FRC Control System         Sensors     Pneumatics     Kit & Additional Hardware     CAD         Inventor         SolidWorks         Creo     IT / Communications         3D Animation and Competition         Website Design/Showcase         Videography and Photography         Computer Graphics     National Instruments LabVIEW and Data Acquisition         LabView and Data Acquisition Competition     Unsung FIRST Heroes     Awards         Chairman's Award     Rules/Strategy         Scouting         You Make The Call     Team Organization         Fundraising         Starting New Teams         Finding A Team         College Teams     Championship Event     Regional Competitions     District Events     Off-Season Events     Thanks and/or Congrats     FRC Game Design     OCCRA         OCCRA Q&A         OCCRA Programming Other     Chit-Chat         Games/Trivia             Fantasy FIRST     Car Nack's Corner     College & University Education     Dean Kamen's Inventions     FIRST-related Organizations         Western Region Robotics Forum         Southern California Regional Robotics Forum         The Blue Alliance             Video Archives     FIRST In the News...     FIRST Lego League         Lego Mindstorm Discussion     FIRST Tech Challenge     VEX         VEX Robotics Competition         VEX IQ     Televised Robotics     Math and Science         NASA Discussion ChiefDelphi.com Website     CD Forum Support     Extra Discussion

All times are GMT -5. The time now is 07:34 PM.

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

 -- English (12 hour) -- English (24 hour) Contact Us - Chief Delphi - Rules - Archive - Top