Lane detection methods: General Question

I am currently using the turtlebot3 lane detection project, provided on the following website:
https://emanual.robotis.com/docs/en/platform/turtlebot3/overview/

From what I understood from the code is that it requires the camera to detect the lines based on color and finding the center line between them.

However, I have ran into issues with the Magni veering off track at times and losing sight. I have been trying to recalibrate as well as different camera positions (from an elevated position, I can add a picture if that would help)

I was wondering:

  • What are possible suggestions and advice for improving this method? (ex. camera positioning, different color schemes, adjusting parameters, different cameras)

  • What other methods would you advise to use? are there existing packages? (ex. any edge detecting codes for ROS)

Thanks in advance

  • What are possible suggestions and advice for improving this method? (ex. camera positioning, different color schemes, adjusting parameters, different cameras)

Well assuming the robot is losing the detections due to low FoV, that can be improved by switching to a wider lens. One that I like to use is the IMX219-D160 with a fisheye field of view.

Untitled

They’re pretty cheap and expand the FoV drastically. It is somewhat harder to calibrate them to get the rectified image (you have to use the melodic branch of camera_calibration which supports fisheye). I do have a calibration file on hand that might help if you need a starting one (but it should be done on each specific camera for best results):

image_width: 416
image_height: 320
camera_name: raspicam
camera_matrix:
  rows: 3
  cols: 3
  data: [ 132.41691,    0.     ,  207.5    ,
            0.     ,  132.41691,  159.5    ,
            0.     ,    0.     ,    1.     ]
distortion_model: fisheye
distortion_coefficients:
  rows: 1
  cols: 4
  data: [0.000000, 0.000000, 0.000000, 0.000000]
rectification_matrix:
  rows: 3
  cols: 3
  data: [ 1.,  0.,  0.,
          0.,  1.,  0.,
          0.,  0.,  1.]
projection_matrix:
  rows: 3
  cols: 4
  data: [  66.87723,    0.     ,  207.5    ,    0.     ,
            0.     ,   66.87723,  159.5    ,    0.     ,
            0.     ,    0.     ,    1.     ,    0.     ]