View Single Post
  #22   Spotlight this post!  
Unread 02-02-2013, 18:32
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 181
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
Re: Move Robot a set angle

Quote:
Originally Posted by Ether View Post
If you had to make this work, how would you go about fixing this problem?


Well, for the thread-starter's situation, I would initialize the setpoint as current heading + desired change. Then it wouldn't matter if the variable was continuous or not. (Assuming I'm remembering correctly that the gyro heading does not reset to 0 when it makes a full rotation.)

On the other hand, if I wanted to turn the robot to an absolute heading, I would probably...you know what, I'm not sure. All my ideas thus far would eliminate the problem of whirling in circles when going from, say, 2520 degrees to 45. But all my ideas would not fix the problem of going from 359 to 0.