This is a project that utilizes ROS 2 Humble, OpenCV, and Gazebo Fortress Ignition to simulate a vehicle that autonomously follows a black line.
-
Create a directory for the workspace
mkdir ros2_humble_ws
-
Change directory to the workspace
cd ros2_humble_ws -
Create src directory
mkdir src
-
Change directory to src
cd src -
Clone this project
git clone https://github.com/Howard-GitHub/line-following-robot.git
-
Change directory back to the root of the workspace
cd .. -
Run colcon build in ros2_humble_ws
colcon build
Here are the instructions to run the simulation of the line-following robot.
- Startup the Gazebo application with the vehicle and black line loaded
source install/setup.bash ros2 launch line_following_robot gz_spawn.launch.py - Run the line-following program on a separate terminal
source install/setup.bash ros2 run line_following_robot line_following_node
Source: https://app.gazebosim.org/KroNton/fuel/models/track1
License: Creative Commons Attribution 4.0 International
Changes: Integrated into a custom simulation world