Announcement

Collapse
No announcement yet.

ODS line following

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ODS line following

    Has anyone had trouble with the line following program using the optical distance sensor? How far from the floor should the sensor be to detect the white tape? Ours just drives in circles over the tape never sensing it.

  • #2
    Caveat: never used it before.

    Do you have it plugged into an analog port (as opposed to digital, or otherwise)? Have you played around with whether it is able to differentiate anything (say between dark black and bright white)?

    Comment


    • #3
      The readings never change from 0.0!

      Comment


      • #4
        Originally posted by thensley View Post
        Ours just drives in circles over the tape never sensing it.
        Sometimes it is the case where is does indeed sense the tape but does not stop and turn back in time.

        Two examples assume coming in from the left side of the tape with the following program:
        turn right while tape is not detected
        turn left while tape is detected

        1) Works
        Once the tape is detected the robots stops and turns left. When it stops the sensor is still over the tape. The robot still senses the tape and continues to turn left. Once the sensor is to the left of the tape then the robot turns to the right.


        2) Problem
        Once the tape is detected the robots stops and turns left. Despite the robot stopping, its momentum actually took the sensor to the right of the tape. So on the next sensor reading the robot does not sense the tape and stops and turns back to the right in a full circle. Again it eventually senses the tape but is going too fast to stop over the tape. So then it swings around to the right again and again.


        Some advice.
        Drive to the line from the left and use a "stop on line" approach first. Once stopped drive back a bit to ensure you are to the left of the line. Now start your line following routine. Pivot with one side of the vehicle rather then spinning with one motor going forward and one going back. Adjust motor power accordingly.


        And as always - test the sensor under various lighting conditions and get it as close as possible to the tape.

        Hope this helps.

        Comment


        • #5
          Originally posted by thensley View Post
          The readings never change from 0.0!
          What type of sensor? Can you share the code? Also FTC10723 's suggestion of verifying the port the Analog channel should be prefixed with A ( A1, A2 ..)

          Comment


          • #6
            OK, we got it I think. The sensor wasn't plugged into the right analog port and the tape wasn't white enough!

            Comment

            Working...
            X