- You need to have ROS Melodic installed.
- Create a new catkin workspace if you don't have one already.
- Clone this repository inside workspace/src:
https://github.com/FineasRobotics/line_follower.git - Install packages:
sudo apt-get install ros-melodic-turtlebot3 ros-melodic-turtlebot3-msgs ros-melodic-turtlebot3-simulations - Run from the root of workspace:
catkin_make - To use turtlebot3, you need to specify which model you are going to use. To do that:
- You either run
export TURTLEBOT3_MODEL=${TB3_MODEL}where${TB3_MODEL}you put burger, waffle or waffle_pi before running the simulation. - Or you put the above line at the end of your ~/.bashrc, with:
gedit ~/.bashrcPS: We use waffle.
- You either run
- Source the workspace(
source devel/setup.bashor check our ROS Basics doc for more information).
- Run:
roslaunch line_follower simulation.launch mode:=sim.
Tip: you can make gazebo open its GUI by changing gui argument inside gazebo_simulation.launch file to true.
- Run:
roslaunch line_follower simulation.launch.
Open another terminal and run: roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
- To test line_follower, run inside test folder:
python -m unittest test_line_follower

