View Single Post
  #2   Spotlight this post!  
Unread 05-27-2011, 08:14 AM
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,998
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: PIDController Rotate


The PID output is the voltage command to the motor being controlled.

Make sure create proper setpoint and processVariable inputs to the PID, for example like so:

angle_error = joystick_command - gyro_angle;
angle_error -= 360*floor(0.5+angle_error/360);
setpoint = gyro_angle + angle_error;
processVariable=0;

See discussion here.




Last edited by Ether : 05-27-2011 at 08:18 AM.
Reply With Quote