Log in

View Full Version : Help with automonous mode


Robohawk-master
21-03-2004, 18:55
Hello,
I have no experience in prgramming (yet I'm a programmer) and I'd like some help on how to create a simple automonous mode using the line sensors to follow the white line and hit the T (..knocking over the ball). Nothing has been changed from the code so if someone could email a whole new code that would be the best. Though I don't have a talent now in prog, I can do photoshop so i can help someone there...

18 days till we leave for competition :ahh:

Astronouth7303
21-03-2004, 21:08
Hello,
I have no experience in prgramming (yet I'm a programmer) and I'd like some help on how to create a simple automonous mode using the line sensors to follow the white line and hit the T (..knocking over the ball). Nothing has been changed from the code so if someone could email a whole new code that would be the best. Though I don't have a talent now in prog, I can do photoshop so i can help someone there...

18 days till we leave for competition :ahh:
Sorry, I can't (and won't) write your code, but I can describe the ideas to you for you to code. I assume you know C and how to use it for this. If not, ask a neiboring team for help.
There are plenty of threads of how to follow a line. Search for "Line Following".

CrashZero
22-03-2004, 09:39
I won't write your code for you either but I will give you an example of how you *could* have your bot follow a line;

if(rc_dig_in01 ==1 )//if one sensor sees it
}
pwm13 = 137;
pwm14=100;
{
else//if this sensor doesn't see it
{
pwm13 = pwm14 = 140;
}
if(rc_dig_in02 == 1)//if the other sensor sees it
}
pwm13 = 100;
pwm14 = 137;
}
else
{
pwm13 = pwm14 = 140;//If this sensor doesn't see it
{

since I just did that off the top of my head there are probebly a few errors in it but if you can;t even fix a few then you need more help then I am willing to give.

I don't know how well this will work becuase personally I think that following the beacon is a better choice.

Just one last time this **may** NOT work even after you fix the errors but it is still an example.

Hope this helps!!!

Robohawk-master
22-03-2004, 17:51
Thanks a lot, I really did not know where to start, that was exactly what I needed :)

CrashZero
23-03-2004, 15:39
:D Glad that I could be of some assistence :p

Tom Saxton
23-03-2004, 16:18
Although line following is simple in theory, getting it to work and have the robot run at a speed that will get you to the tee in the 15 seconds is pretty challenging. We ignored the advice of experienced teams and tried doing it with custom analog sensors using a proven algorithm, and we had to eventually abandon it.

Using digital sensors, your robot will jerk back and forth as it goes down the line, greatly slowing it down. This can be solved with analog sensors and applying speed corrections proportional to the difference in sensor readings. This can work much better, yielding very smooth, fast driving. But getting that to work requires careful tuning.

However, your lines sensors need to be far enough in front of your drive wheels that the sensors tell you how much you need to turn, not how much you needed to turn 10 cycles ago.

My advice is to do dead reckoning unless you have very experienced programmers, analog line sensors and good separation between the sensor and the steering wheels.

Robohawk-master
23-03-2004, 18:11
I realize the difficulty. This is our second year, so nothing is trusted on. We decided on line sensors because we knew how well they worked last year (good, but the bot had faulty fuses...). Heck they're even the same ones. We took into account where to place them, how close (last years sensors actually have a 5-10 ft advantage over this years banners.