Robot drifting on track

Hi everybody…

I am building a line follower which came 4th place making 18 meter long track in 29.50 seconds :slight_smile:

I have written a PID line follower but I don’t constrain the power difference values to 0, 255, but -65, 255, so when the power is negativ the robot puts the wheels on reverse…
if I drive the motors only forward… my robot don’t have time to take the turns making it go in reverse even with 0 on one motor and 255 on the other… so puting it in reverse helps a bit on turning…
I use pololu 42mm off road tires… I am thinking on using 32mm sport tired like in 3pi…

here is a video of my robot’s behaviour

as you see, even after that it drifts on the track… I had a part where he went sliding at a 45 degree from track and the wheels were spinning and drifting on the track… should I put on the sport tires? I need to buy them and being in romania, the cost of the transport would kill me probably…

Hello.

I am not sure if switching out your tires will help with your problem, but if you would like to try and are concerned about shipping costs, you might see if one of our distributors near you carries the 32x7mm tires.

Before trying new tires though, you might want to see if further tuning of your PID constants helps at all. Cleaning your wheels after every run and keeping the track as clean as possible might also help.

Additionally, it might not be practical with your current robot, but usually, the further ahead of your robot you can mount your sensors the better.

-Taylor

I agree: that looks to me like the robot is over-reacting, rather than a tire slipping problem.
I’d look at, in order:

  1. Increasing the D (derivative) gain to counteract the over-turning.
  2. Getting a wider sensor, so that you can afford to “turn less” and still keep contact with the line.
  3. Mounting the sensor further ahead, so that you get more warning about upcoming turns.

Hi, did you get anywhere with the suggestions?

I’ve also been developing line followers using the Pololu 10:1 (standard) micro gear motors. Boy, these motors are quick! I’ve also needed to use negative motor speed values to get around 15cm(6") radius bends. I’ve noticed similar behavior on bends to your vehicle, even though I’m using the 32 x 7 mm wheels & tires.

I found the ‘skidding’ was caused by having too great a negative speed value on the inside motor - the amount of applied twist exceeds the friction between tire and track on sharp bends.

I also found that there was a balance between PID coefficients and the amount of negative speed applied. With more negative speed, the P & D coefficients can be reduced.

Of course, we say ‘negative speeds’ but in practice, I do not think the inside motor actually reverses, just applies additional braking.

Hope this helps!