Quote:
Originally Posted by gpetilli
We set up a timed PID thread with period 10ms. We set up a delta time measurement in both the teleop periodic and timed PID loops and plotted the delta times.
|
Could you give some additional detail on how you set up the delta time measurement?
For example, did you do it like this:
Code:
// begin thread
new_time = get_time();
delta_time = new_time - previous_time;
previous_time = new_time;
.
.// do stuff here
.
// end thread
or like this:
Code:
// begin thread
start_time = get_time();
.
.// do stuff here
.
delta_time = get_time() - begin_time;
// end thread
or something else?