|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||||
|
||||||
|
Re: Thread scheduler for PID period control ?
I am not sure why but the autogenerated code from RobotBuilder does not include the feed forward gain, Kf, and the loop period, so they default to 0 and 50ms.
Here is a code snippet: public Launch() { super("Launch", Kp, Ki, Kd, Kf, 0.01); Note that we had 0.005 as the period at first and it was acting squirrely. I think we were having the PID loop take too much of the CPU time. When we backed off to 10ms, life was good. YMMV. Joe J. |
|
#2
|
|||
|
|||
|
Re: Thread scheduler for PID period control ?
Hi,
we tried using the getFPGATimestamp() instead of the basic .get(), and we were able to get values around 11 - 16 ms for our timed PID loop with the scheduler set to 10ms. in teleopPeriodic we got values around 21 - 23 ms. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|