This project implements a line detection and following system using ROS (Robot Operating System) and OpenCV. The system uses a camera to capture images, detects a line in the image using color-based segmentation and contour detection, and controls the robot's movement to follow the detected line.
- ROS2 (Robot Operating System)
- OpenCV
- Python 3
- Clone the repository into your ROS workspace:
git clone <repository_url> <workspace_dir>/src/line_detection
- Colcon build in the workspace
colcon build --symlink-install
- launch car_on_track.launch.py file:
ros2 launch prius_line_following car_on_track.launch.py
- Run the nodes
./line_following.py