Skip to content

atom-robotics-lab/line_follower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Line_follower

This is line follower robot based on OpenCV(computer vision).

Introduction

In this project, we use OpenCV to capture video from the Image sensor on the bot and then process the image by masking the path and drawing Contour & Momments of the masked image. Now in bot_control class we use P(proportional control) to correct the deviation of the bot from the path and publish them into the /cmd_vel topic which helps the bot to take a turn.

Installation

Pre-Requisites:

  • ROS noetic : Refer to the official documentation for installation of ROS noetic.

  • Catkin workspace : A catkin workspace is a folder where you modify, build, and. install catkin packages. Take a look at the official documentation for instructions regarding creation of a catkin workspace

Installation of Virtualenvwrapper, OpenCV, and CV_bridge

Your can refer to A.T.O.M's wiki for installation of the above mentioned packages and libraries.

Clone the Line Follower package

Now go ahead and clone this repository inside the "src" folder of the catkin workspace you just created by executing the command given below in your terminal.

git clone [email protected]:atom-robotics-lab/line_follower

Clone the MR-Robot package

This package provide us the bot which we are gonig to use. Go inside the "src" folder of the catkin workspace and executing the command given below in your terminal.

git clone [email protected]:atom-robotics-lab/MR-Robot.git

Note:

Now out robot does not have camera in this package so we have to chang branch from main to with_camera.
Now then go inside MR-Robot package you just created by executing the above command then executing the command given below in your terminal.

git checkout with_camera 

Hurray!!! All installation is done

Make the package

We'll need to "make" everything in our catkin workspace so that the ROS environment knows about our new package. (This will also compile any necessary code in the package). Execute the given commands in your terminal.

cd ~/catkin_ws
catkin_make

Launch

launching world

roslaunch line_follower bot_world.launch

The above command when executed in the terminal will launch the gazebo simulation and will also start ROS Master.

Run script

rosrun line_follower line2.py

The given command will run the controller script which controls the robot's movements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •