Skip to content

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

License

Notifications You must be signed in to change notification settings

SravanChittupalli/Lane-following-bot-in-Gazebo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published