|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Robot Drifting
Quote:
|
|
#2
|
||||
|
||||
|
Re: Robot Drifting
I spent the entire day yesterday, and 2 hours today learning to stop our 2003 robot on a dime in a 30 by 36 box when driving from about 10 feet away. Yes, the robot drifts. Yes, it is really annoying to have to compensate for it. Yes, this is going to happen in real matches. Yes, I'm going to shut up and deal with it. Just have your driver prepare for it.
|
|
#3
|
|||||
|
|||||
|
Re: Robot Drifting
Quote:
You don't evaluate (150/100). You evaluate (x * 150 / 100). To get a floating point effect you do all your multiplication first, then all your division. In integer math,e.g., x = 150/100 * 100 = 100 but x = 100 * 150 / 100 = 150 Just be careful to type cast the expression to the largest size you need, e.g., using all char for the above will return an incorrect result. Last edited by Mark McLeod : 15-02-2004 at 13:59. |
|
#4
|
||||
|
||||
|
Re: Robot Drifting
You Constant (#define) can be a floating point value.
but.... when you apply it in your program the result will be an int. ie. #define CONSTANT 1.5 int adjust_speed(int speed_in) ( int speed_out; speed_out = (speed_in/CONSTANT); return speed_out; //sends back an int ) |
|
#5
|
||||
|
||||
|
Re: Robot Drifting
Quote:
Code:
#define CONSTANT 3/2 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controlling a FIRST robot with a Lego RCX Controller? | archiver | 2001 | 5 | 24-06-2002 04:19 |
| NEW robot club | archiver | 2001 | 0 | 24-06-2002 03:15 |
| Are you willing to let others take picture of your robot? | Ken Leung | Robot Showcase | 21 | 10-04-2002 22:50 |
| Kamikaze Robot Strategy... | Joe Johnson | Rules/Strategy | 30 | 07-04-2002 21:42 |
| Calling all Lawyers... ...Define "all parts" | Joe Johnson | General Forum | 10 | 13-03-2002 15:12 |