View Single Post
  #3   Spotlight this post!  
Unread 02-05-2016, 03:52 PM
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: 37
KJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud ofKJaget has much to be proud of
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