View Single Post
  #6   Spotlight this post!  
Unread 11-02-2012, 18:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: Benefits of "Periodic Tasks VI"?

Quote:
Originally Posted by Tom Line View Post
So, if we were to put a motor set-speed in periodic tasks, we could update the motor speed far more quickly and control that motor more precisely, correct?
I'm not sure I follow you, Tom: more quickly and more precisely compared to what?

Quote:
Or are the motor set-speeds tied to the control station packets somehow?
TeleOp is not strictly speaking periodic; it's event-driven: It runs whenever data packets are sent, which occurs about every 20ms. You can then read that new data within TeleOp and act on it immediately within TeleOp, as long as you can do so well within 20ms. If your TeleOp code takes longer than 20ms to execute, you'll miss the next data packet.

Reading joystick values in a 10ms periodic task doesn't get new joystick data any faster.

Reading sensors on your robot faster than 20ms gets new sensor data that can be used to alter motor commands if you think you need to do that.


Last edited by Ether : 11-02-2012 at 18:49.