{"id":27556758,"url":"https://github.com/hasanziyade/line-follower_robocar","last_synced_at":"2026-05-08T13:13:24.916Z","repository":{"id":288045081,"uuid":"966646177","full_name":"HasanZiyade/Line-follower_RoboCar","owner":"HasanZiyade","description":"Line follower robot using picamera on raspberry pi","archived":false,"fork":false,"pushed_at":"2025-04-15T08:54:38.000Z","size":7979,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T09:41:33.239Z","etag":null,"topics":["line-follower-robot","opencv","pathfinding","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HasanZiyade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T08:37:51.000Z","updated_at":"2025-04-15T09:06:00.000Z","dependencies_parsed_at":"2025-04-15T09:51:53.813Z","dependency_job_id":null,"html_url":"https://github.com/HasanZiyade/Line-follower_RoboCar","commit_stats":null,"previous_names":["hasanziyade/pathfollower-robocar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasanZiyade%2FLine-follower_RoboCar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasanZiyade%2FLine-follower_RoboCar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasanZiyade%2FLine-follower_RoboCar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HasanZiyade%2FLine-follower_RoboCar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HasanZiyade","download_url":"https://codeload.github.com/HasanZiyade/Line-follower_RoboCar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249787068,"owners_count":21325569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["line-follower-robot","opencv","pathfinding","raspberry-pi"],"created_at":"2025-04-19T19:55:57.148Z","updated_at":"2026-05-08T13:13:24.882Z","avatar_url":"https://github.com/HasanZiyade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Line-following Robocar Project\n\n## Overview\nThe Robocar project is designed to create an autonomous vehicle that can navigate using computer vision techniques. The project utilizes a camera to detect black lines on the ground and adjusts the motor speeds accordingly to follow the path.\n\n![Robocar](media/RoboCar.jpg)\n\n## Installation\n1. Clone the repository:\n   ```\n   git clone https://github.com/yourusername/robocar.git\n   ```\n2. Navigate to the project directory:\n   ```\n   cd robocar\n   ```\n3. Install the required packages:\n   ```\n   pip install -r requirements.txt\n   ```\n\n## Usage\nTo run the Robocar, execute the following command:\n```\npython src/main.py\n```\n\n## Hardware Setup\nRefer to the `docs/hardware_setup.md` file for detailed instructions on setting up the hardware components.\n\n![Robocar Wiring](media/RobocarWiring.jpg)\n\n## How It Works\nThe Robocar uses a simple but effective approach to follow lines:\n\n### Image Processing\nThe system captures video frames from the camera and processes them to detect black lines:\n1. A region of interest (ROI) is defined in the lower portion of the image\n2. Color thresholding isolates black lines from the background\n3. Morphological operations (erosion and dilation) clean up the binary image\n4. Contour detection finds the shape of the line\n5. The center point of the detected line is calculated\n\n### Line Following Logic\nThe robot follows the line using a control system:\n1. An error value is calculated as the difference between the line's position and the center of the frame\n2. The `direction()` function determines appropriate motor speeds based on the error:\n   - Small error: Both motors run at full speed\n   - Moderate error: One motor slows down to correct course\n   - Large error: One motor stops while the other continues\n   - Extreme error: Both motors stop (line lost)\n3. The differential in motor speeds causes the robot to turn toward the line\n\n### Control Flow\n1. Main loop captures frames continuously\n2. Each frame is processed to find the line position\n3. Motor speeds are adjusted in real-time based on the line position\n4. Visual feedback is provided through OpenCV windows\n\n## Demo\nhttps://youtu.be/oZ3vJQsgQos\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasanziyade%2Fline-follower_robocar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasanziyade%2Fline-follower_robocar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasanziyade%2Fline-follower_robocar/lists"}