Rookie + errors = fail()

we are having way too much trouble in programming line trackers ???

we tried everything … first only left motor spins while right one is at sleep and then at last two seconds both of them spins at the opposite direction,

please see included pictures

and thanks

For more detail behind why the code was written that way, you may want to review the tutorial at http://decibel.ni.com/content/community/first/frc?view=all#/?tagSet=1001 in the lower right. It is the one about line following.

To directly answer your questions. The lists of numbers are an array of power values. These are used to vary the speed of the robot for different parts of the line. Generally, the idea is to go pretty fast at the beginning, slow down for any curves and for the T at the end of the line. Since the default code cannot assume a distance encoder, the power array is indexed using elapsed time.

The one labeled Straight Power is used for the straight line, and the Y power is used with following either the left or right of the line with the Y fork.

The steering gain determines how much the robot steers to the left or right. Since the line sensors return a Boolean signal, the robot has four basic responses – go left, go right, go straight, or stop. As the steering gain is made larger, the robot will steer more sharply and “bounce” from side to side, over-correcting. As the number is reduced closer to zero, the robot will steer more gently and at some point will under-correct.

My advice would be to focus on the teleop first. Use either the arcade or tank drive and think through the issues until you have forward, backward, left steer and right steer working correctly. At that point, you should be able to tune the auto. If you have more issues, post questions here.

Greg McKaskle

Tele op works perfectly ! we managed to code it for acrade drive and it’s perfect as it could be ! but the weird part is that why would two wheels spins in opposite direction from beginning, we did put reflective tape on left side of the sensor

when we tried on the ground, robot went straight sometimes and sometimes it instantly took left turn (always left).

and also now we are getting errors tht

loop that contains robot Drive is not running fast enough !

thanks for your help, will try different setting on monday !

Megh Suthar

Can you elaborate on that? What did you expect putting the tape there to do, and how did you expect it to do it? When you say “on left side”, do you mean actually sticking the tape to the sensor housing, or sticking the tape to something next to the sensor? Or is the sensor looking left at the reflective tape?

My big question is this: why are you using reflective tape at all?

You’re supposed to use a certain gray gaffers tape. The reflective tape is for the pegs

Regarding how it is turning always left, its definitely code related, could I see your code?

Ethan

Did you calibrate your line tracker sensors? Our team is having problems with those.