NAMENETIDCOURSE
David Hurdhur2ECE110
Chris Chungsungjoo2ECE110



Project Proposal Guideline

  1. Introduction

    1. Statement of Purpose

      i. We aim to create a very basic model of an autonomous vehicle that follows a given set of lane lines.

    2. Background Research
      i. Computer Vision uses artificial intelligence and machine learning to recognize the object because a camera itself can't recognize everything in a picture. It only recognizes pixels which is where we come in and give it a lot of references and the computer will use those images to recognize what the object in the images. We instruct the robot how to react when "seeing" certain objects. Such as making it follow a line or stopping when there is an irregular object in front of it. We will have to learn how to make the robot recognize objects and how it will react to it. We are probably going to use servo motors in order to get precise movement on the wheels to follow the line. We will use the ultrasonic sensors on the sides of the robot to sense if there is something to the left of right to it and turn to avoid the obstacle meanwhile the camera in front will use to see the line to follow or keep moving as long as there is nothing that keeps it from moving. We will find car chassis that has a motor and wheels and a camera mount on it. Our goal of this project is to have the robot follow a line or just keep moving around and avoiding obstacles until it runs out of battery. If we have time we may try making it follow something that moves. There is a tutorial [6] that thoroughly goes through how we can use the camera and motor at the same time. We will reference that tutorial a lot because we do not have enough OpenCV and programming experience.



  2. Design Details

    1. Block Diagram / Flow Chart



    2. System Overview

      Roughly speaking, our project consists of two big systems.

      Lane Detection

      The first being Lane Detection. During this process, information is provided from our sensor (camera) to Raspberry Pi, and needed information is extracted.

      Video received from our camera is essentially just a series of images. Therefore, we first need to come up with a method to process an image given from our camera, and to extract useful information from that image, which will be our desired lane lines. This process will be done through the following steps.

      First and foremost, we will crop our image to regions of interest. Since the camera angle will be fixed, we can determine from the coordinate of the images approximately where our lane lines will be. Because our vehicle's only function is to detect and follow lane lines (although this is never the case in real-life, as we have to watch out for other cars, traffic lights etc.), we just need to crop the region where the lane lines will be included in.

      After cropping the image, we'll further simply our image by converting image to grayscale, so that in order to detect the lane lines, we just have to detect pixels where there's a rapid change in intensity values. This will simplify our detection process greatly.

      From the simplified and cropped image,  will use a method called Canny Edge Detection, developed by John F. Canny, which detects a wide range of edges in images, but since we've cropped the image so that only lane lines will be included, the edges detected will be the edges of our lane lines.

      At this point, we should be left with gray-scaled edge pixels. Now we want to convert these edges (which might be continuous or discontinuous) into actual lines for the vehicle to follow. We will implement Hough Transformation , which will transform our edge pixels into different form of mathematical form that represents a line curve.

      Turn Decision

      The second being Turn Decision, where we now feed the extracted information to our Arduino, which then orders our vehicle (motors) to steer in the desired direction.

      At this point, it's safe to assume that we now have an image that contains only the information we need for the vehicle : lane lines

      Now, from the given lane lines, we need to implement a way for our vehicle to make turning decision based on these lane lines. This will be done through some mathematics, but the main idea is that when the desired path is straight, our path should be a vertical line on the image. If we use this vertical line as our reference line, when the path is no longer straight, it will form an angle with our reference line, and this angle will be used to determine how much we should steer our vehicle in order to be on track. 

      Since our image processing process created two lane lines (one left one right), we can easily take the average of the two lane's angle and calculate its offset with the reference line. 


  3. Parts

    Raspberry Pi (preferably 3 or 4)
    Raspberry Pi Camera Module
    Motor Driver stepper
    Arduino Uno 
    Arduino Shield
    A Car Chassis
    4 Servo Motors (for each wheel)
    Battery


  4. Possible Challenges

    Although there are many resources online concerning the software part of image processing and computer vision, since both me and my partner has no prior experience in coding, understanding the open source codes and modifying them to fit into our design and project will be very challenging

    Furthermore, there are some limitations on Hough Transformation, mainly because it gives us a linear line, but lane lines in real life (or even in our project) are curves, so the sharper the curve is, the more inaccurate our given transformation will become



  5. References

    [1]M. Hardwick, "Simple Lane Detection with OpenCV", Medium, 2020. [Online]. Available: https://medium.com/@mrhwick/simple-lane-detection-with-opencv-bfeb6ae54ec0. [Accessed: 21- Feb- 2020]
    [2]A. Raffin, "Autonomous Racing Robot With an Arduino, a Raspberry Pi and a Pi Camera", Medium, 2020. [Online]. Available: https://becominghuman.ai/autonomous-racing-robot-with-an-arduino-a-raspberry-pi-and-a-pi-camera-3e72819e1e63. [Accessed: 21- Feb- 2020]
    [3]A. Desoky, A. Bayoumy and G. Hassaan, "Implementation of Vision-Based Trajectory Control for Autonomous Vehicles", International Conference on Aerospace Sciences and Aviation Technology, vol. 17, no., pp. 1-18, 2017.
    [4]Canny, J., A Computational Approach To Edge Detection, IEEE Transactions on Pattern Analysis and Machine Intelligence, 8(6):679–698, 1986.
    [5]"Hough transform", Planetmath.org, 2020. [Online]. Available: https://planetmath.org/houghtransform. [Accessed: 21- Feb- 2020]
    [6]"Autonomous Lane-Keeping Car Using Raspberry Pi and OpenCV", Instructables, 2020. [Online]. Available: https://www.instructables.com/id/Autonomous-Lane-Keeping-Car-Using-Raspberry-Pi-and/. [Accessed: 04- Mar- 2020].


Comments:

I'd recommend doing a bit more research and updating your proposal. Which car chassis will you be using? Once you detect the parking space, how do you plan on controlling your vehicle such that it moves exactly into the parking space (ie, will you be using additional sensors such as encoders on the wheels)?

Posted by jamesw10 at Feb 15, 2020 20:09

I agree with James. Please do more research on this topic. You will have to consider how the car is recognizing the space and how the Arduino controls the motors to move the car at the right speed and duration.

Posted by yuchenc2 at Feb 16, 2020 02:38

I've said this a few times before for some other proposals; if your project is too similar to the ECE 110 final project (car with ultrasonic sensor to detect obstacles) neither we nor the professors with accept this project for credit. We require fundamentally different projects from the 110 project. Please make sure your project is sufficiently differentiated from the basic 110 project to avoid losing credit.

I also agree with the other staff members, you need a lot more background research. The code/algorithms for this will by far be the most complex part of this, and yet you have no research, no plans, or diagrams about how you will accomplish this. I'm going to say this needs significant revision and planning before I would accept this project.

Posted by fns2 at Feb 16, 2020 13:28

Seems like you guys need to put in a bit more work into the planning of it all. 

Please note, if you guys want any custom chassis or other mechanical structures, this does take a lot of time and will only get more time consuming as senior design projects start to use the machine shop and other resources.

Posted by dbycul2 at Feb 16, 2020 22:15

This will definitely work much better and be more fun if you use a camera and learn some computer vision to do this project.  

Posted by akhatua2 at Feb 16, 2020 22:39

Please make additional revisions, such as improving your block diagram with greater detail and adding background research for the computer vision aspect.


Posted by fns2 at Feb 20, 2020 19:01

Project Accepted as of 3/3/20

Posted by weustis2 at Mar 03, 2020 18:44