{"id":26896070,"url":"https://github.com/sofiasawczenko/autonomous_robot_computer_vision","last_synced_at":"2025-10-12T07:42:25.238Z","repository":{"id":82608566,"uuid":"590976817","full_name":"sofiasawczenko/autonomous_robot_computer_vision","owner":"sofiasawczenko","description":"This project integrates computer vision and robotics to create an autonomous robot for navigation on streets using Python, C, OpenCV, Flask, and GPIO libraries for image processing, motor control, and web-based interaction, with a Raspberry Pi handling vision and logic, and an Arduino managing motor control.","archived":false,"fork":false,"pushed_at":"2024-12-18T10:02:07.000Z","size":408,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T02:59:30.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sofiasawczenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-01-19T16:46:29.000Z","updated_at":"2025-02-08T23:59:40.000Z","dependencies_parsed_at":"2024-12-18T10:32:19.634Z","dependency_job_id":"11bfe7ab-6784-47d7-8cd6-038b6cde884e","html_url":"https://github.com/sofiasawczenko/autonomous_robot_computer_vision","commit_stats":null,"previous_names":["sofiasawczenko/robo_autonomo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sofiasawczenko/autonomous_robot_computer_vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofiasawczenko%2Fautonomous_robot_computer_vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofiasawczenko%2Fautonomous_robot_computer_vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofiasawczenko%2Fautonomous_robot_computer_vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofiasawczenko%2Fautonomous_robot_computer_vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sofiasawczenko","download_url":"https://codeload.github.com/sofiasawczenko/autonomous_robot_computer_vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sofiasawczenko%2Fautonomous_robot_computer_vision/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010671,"owners_count":26084785,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-04-01T02:59:33.291Z","updated_at":"2025-10-12T07:42:25.203Z","avatar_url":"https://github.com/sofiasawczenko.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autonomous Robot with Computer Vision\n\n![image](https://github.com/user-attachments/assets/360726dc-57e5-4f55-a249-713dce8f9764)\n\nThis repository contains the source code and necessary resources for building an autonomous robot using Python, C, Raspberry Pi, and Arduino. The robot features a navigation system based on computer vision.\n\n## Overview\n\nThe goal of this project is to develop an autonomous robot capable of navigating independently in an environment using computer vision techniques to detect obstacles and make navigation decisions. The robot integrates hardware and software, with the Raspberry Pi handling image processing and decision-making, while the Arduino controls the motors and sensors.\n\n## Key Features\n\n- **Computer Vision**: Equipped with a camera, the robot captures images of its surroundings. The computer vision algorithm processes these images to identify obstacles, free paths, and other navigation-critical information.\n- **Motor Control**: The Arduino is responsible for motor control, allowing the robot to move forward, backward, turn, and perform other maneuvers to avoid obstacles and follow predefined paths.\n- **Obstacle Detection**: Using advanced computer vision techniques, the robot identifies obstacles and adjusts its movement to avoid collisions.\n- **Autonomous Navigation**: The navigation system on the Raspberry Pi uses input from computer vision and sensors to make real-time decisions, enabling the robot to move autonomously.\n\n## Hardware Requirements\n\n- **Raspberry Pi**: For image processing and navigation logic.\n- **Arduino**: To control motors and read sensor data.\n- **Camera**: For capturing real-time images for computer vision.\n- **Motors and Wheels**: For movement.\n- **Sensors**: Optional for additional obstacle detection.\n- **Car configuration**: ![image](https://user-images.githubusercontent.com/102625995/213512193-e9fb21fe-8b2e-4cc8-a5c1-bce0abad373d.png)\n\n## Software Technologies\n\n- **Programming Languages**: Python, C\n- **Libraries**: OpenCV, Flask, NumPy, GPIO libraries (e.g., RPi.GPIO, gpiozero)\n- **Frameworks**: Flask for web-based robot control\n\n## Getting Started\n\n### 1. Clone this repository:\n\n```bash\n   git clone https://github.com/sofiasawczenko/robot_using_computervision.git\n```\n###  2. Set up your Raspberry Pi and Arduino:\n\n- Flash the appropriate Arduino code for motor and sensor control.\n- Install the required Python libraries on the Raspberry Pi using pip:\n\n```bash\npip install opencv-python flask numpy\n```\n### 3. Assemble the robot hardware, connecting the Raspberry Pi and Arduino as specified in the configuration.\n\n### 4. Run the Flask server on the Raspberry Pi to control the robot:\n\n```bash\npython app.py\n```\n\n### 5. Code Snippets\n**1. Motor Control with Raspberry Pi**\n\n\n```bash\nimport RPi.GPIO as GPIO\nimport time\n\nGPIO.setmode(GPIO.BOARD)\nRF = 12  # Right Forward\nRB = 32  # Right Backward\nLF = 33  # Left Forward\nLB = 35  # Left Backward\n\nGPIO.setup(RF, GPIO.OUT)\nGPIO.setup(RB, GPIO.OUT)\nGPIO.setup(LF, GPIO.OUT)\nGPIO.setup(LB, GPIO.OUT)\n\n# Example movement: forward for 2 seconds\nGPIO.output(RF, True)\nGPIO.output(LF, True)\ntime.sleep(2)\nGPIO.output(RF, False)\nGPIO.output(LF, False)\nGPIO.cleanup()\n```\n\n**2. Computer Vision for Obstacle Detection**\n\n```bash\nimport cv2\n\ncap = cv2.VideoCapture(0)\nwhile True:\n    _, frame = cap.read()\n    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)\n    # Detect obstacles using a classifier\n    obstacles = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')\n    detected = obstacles.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=5)\n    for (x, y, w, h) in detected:\n        cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 255, 0), 2)\n    cv2.imshow(\"Obstacle Detection\", frame)\n    if cv2.waitKey(1) \u0026 0xFF == ord('q'):\n        break\ncap.release()\ncv2.destroyAllWindows()\n```\n\n### How to Contribute\nContributions are welcome! Follow these steps to contribute:\n\n- Fork this repository.\n- Clone the forked repository:\n```bash\ngit clone https://github.com/YOUR_USERNAME/robot_using_computervision.git\nCreate a new branch:\n```bash\ngit checkout -b feature-name\n```\n- Make your changes and commit:\n```bash\ngit add .\ngit commit -m \"Description of changes\"\n```\n- Push your changes and open a pull request:\n```bash\ngit push origin feature-name\n```\n\n## Acknowledgments\nThis project was inspired by the potential of integrating computer vision with robotics to create efficient autonomous systems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofiasawczenko%2Fautonomous_robot_computer_vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsofiasawczenko%2Fautonomous_robot_computer_vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsofiasawczenko%2Fautonomous_robot_computer_vision/lists"}