SravanChittupalli / Lane-following-bot-in-Gazebo

LaneDetection bot using canny edge detection, hough Transform, PID control in Gazebo using ROS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lane-following-bot-in-Gazebo

MIT License LinkedIn

Table of Contents

About The Project

output_screenshot

This project was made just out of pure interest in Self-Driving Cars. I've always wondered how cars follow lanes. During my 1st year of engineering I've worked with line following bots and thought why everyone uses a line sensing array and not a camera to follow the line. Using that motivation I've learnt about line detection and algorithms used to follow the line. Later in second year I've learnt ROS and Gazebo then I thought why not apply the line following to detect lanes and make the bot follow the lanes using a control loop like PID.

Few algorithms used for Lane Detection:

The math behind all the algorithms is really good and is not that tough. I would recommend everyone to implement those algorithms from scratch in python. I've directly used openCV library here. I will write a blog post on these basic topics and you can find them in Blogs section

A list of commonly used resources that I find helpful are listed in the acknowledgements.

Built With

Getting Started

output_screenshot

Using this repo is extremely easy if the prerequisites are fulfilled.

Prerequisites

Installation

  1. Enter into your ROS workspace
cd catkin_ws/src
  1. Clone the repo
git clone https://github.com/SravanChittupalli/Lane-following-bot-in-Gazebo
  1. Then go to your workspace directory and run catkin_make
  2. Start ROS core using command: roscore
  3. Open a new terminal and use roslaunch my2wr gazebo.launch
  4. Open another terminal and run roslaunch gazebo_ros empty_world.launch
  5. Open a new terminal and cd into ros_ws/lane_follow/scripts
  6. Enter python main.py

Usage

This repo can act as our starting point in Self-Driving Car journey. This repo contains the URDF of a bot this bot can be spawned in any environment. The bot is equiped with a USB camera and has differential drive. You can perform different tasks like:

  • Advanced Lane Detection
  • Lane detection using Neural Networks
  • Behavioural Cloning

This repo can act as a base so that you dont have to waste time building up a bot.

Future work

I am learning behavioural cloning. The next target is to feed in images of the road and the bot decides if it wants to turn, stop, acceplerate.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

About

LaneDetection bot using canny edge detection, hough Transform, PID control in Gazebo using ROS

License:MIT License


Languages

Language:CMake 54.5%Language:Python 45.5%