View Single Post
  #3   Spotlight this post!  
Unread 30-01-2014, 12:08
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,063
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Thread scheduler for PID period control ?

Quote:
Originally Posted by gpetilli View Post
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?


Reply With Quote