Any good ideas about line calibration?

I was busy tuning our program for our national competition,so i posted several threads about programming these days.I was inspired by your replys.That’s really helpful.Thanks very much!:slight_smile:
I am thinking about line calibration.Our team always use line followers,but it seems our line-reposition routine isn’t very accurate.I’m sure that’s mainly becasue of the algorithm we’re using.I would like to introduce some of our method and hope to hear your method of line calibration.

My English isn’t very good,I’ll try my best to explain it.

The most rigorous method we thought is written by easyc,so it’s hard to post here.We installed 2 parallel line followers on each side,moving forward,count the encoder value difference between twice times that each of the line trackers corssed the white line,and devide the difference by the ideal encoder units between the length of 2 line followers,which gets an ideal tangent of the target angle you want to rotate.Then arctangent it and rotate by using encoders.The method is too ideal,I thought.The calculated tangent value isn’t very accurate and it’s hard to rotate exactly when the target degree is very small.And mainly because of the static problem with the IMEs,we didn’t use them ar WORLDS.I still think the method is too ideal.

Another method is so easy.We move forward,when one line tracker detected the white,stop that side and moving forward the other side until the other line tracker detected the line as well.

This routine is good enough when the target degree is big,but when it comes very small,it is easily overshoot because the brake can’t stop the robot immediately.

I am also thinking about creating a coordinate from tile to line from the line follower sensor to enable pid control.But the problem is that the coordinate of each side of the line is the same,otherwise the coordinate is symmetric,so it’s hard to identify whether you have crossed the line or not.And the value is changing too fast,the target is always changing.

These are the things i am thinking about.I couldn’t thought a better way to line up with the white line.Every smart guy,what’s your method of line calibration?Would you like to share it and inspire me?Thanks a lot!


It’s been a while since there have been some line tracking threads in detail.

Look in 24C’s code a few years ago. They had quite the array of sensors on their robot. There are some other really good examples if the search actually returned them to you.

But you are right about blowing by the line and then having to saerch for it again. If you detect a line, you need to be going pretty slow to stop while still on the line.

(I am going to make another trhead about the forum site search results being lacking)

Type this in google. The site directive says just look at the vex forum site and ignore all other places. notice the results you get there versus the no results in the forum. calibrating line sensors

That’s ture.When i was searching for pid before,the forum told me that there’re too many threads about pid so it filtered it.So i had to google"pid",and i had been already used to it.I hardly using the forum site search right now.

Well,most thread i found were talking about line following,not line up with the white line.Few and few teams are using really accurate line calibration routine.It only seems to be vertical.Well,it’s true that nearly vertical with the white line is enough,but i am just thinking about a more accurate way.I’ll read 24C’s program later.Thanks!

I think they slowed down in the target range of the line and then counted the overshoot to gauge how far they needed to back up. Look at their autonomous and you can see a “find the line” kind of work in there. I think it may be kind of lumped in their general code so it’s a bunch of if statements inside the line drive functions if I remember right. It’s also a proportional drive if I remember right, not a full PID. It was pretty good code and served them well.

The other part was the configuraiton of the sensors themselves. They had a bunch in line with two outward “wing sensors” detecting the lines at the far edges. The rest were bunched next to each other towards the center.