Go to Post The longer you play robots, the more you realize that it's not about the robots. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2016, 22:22
Alex Walsh Alex Walsh is offline
Registered User
FRC #4122 (O-Bots)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2013
Location: New York
Posts: 3
Alex Walsh is an unknown quantity at this point
Question Averaging and Storing GRIP Values w/ C++

Our team is having trouble deciding the best way to average out the readings we get from NetworkTables and storing those as accurate variables to move our robot about in autonomous. Any teams have success with this yet?

Last edited by Alex Walsh : 02-02-2016 at 22:38.
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2016, 14:30
axton900's Avatar
axton900 axton900 is offline
Programming Co-Captain
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: New Jersey USA
Posts: 45
axton900 has a spectacular aura aboutaxton900 has a spectacular aura aboutaxton900 has a spectacular aura about
Our team is also wondering the same!
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2016, 15:52
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Cary, NC
Posts: 35
KJaget is just really niceKJaget is just really niceKJaget is just really niceKJaget is just really nice
Re: Averaging and Storing GRIP Values w/ C++

For filtering, the typical go-to in control systems is a Kalman filter. That's also almost certainly complete overkill for this - a simple low-pass filter is very likely good enough and quite easy to program : e.g. http://www.earlevel.com/main/2012/12...e-pole-filter/.

As has been mentioned in other threads, the feedback from networktables probably isn't low-latency enough to do closed-loop control on. Instead, you'd grab a value from NT and use it as the set-point for another control system which has better feedback (e.g. encoders & PID or whatever). Once you arrive at the set-point, resample the NT value to see how far off you are. Again adjust this error using the feedback control system. Rinse and repeat. At some point your error will be close enough and you're where you need to be based on the NT values.

I suppose you could also adjust on the fly - that is, update setpoints periodically from NT even while you're still on the move, assuming the control system can handle this.
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:59.

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