Skip to content

asood-life/vision-2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vision 2.0

Computer Vision Event organised by Robotics Club of IIT (BHU) Varanasi


Arena Bot


  • The Arena is divided into two distinct paths: INNER Square and OUTER Square. These paths are interconnected by four distinct pathways, each marked with a unique color and leading to the Home Zone.
  • The Bot can switch between the OUTER and INNER paths and is mandated to move in a clockwise direction.
  • Movement within the BLACK-colored areas of the arena is restricted for the Bot.
  • Various shapes (Square, Circle, and Triangle) adorn the Arena, each represented in two distinct colors, Red and Yellow, creating a total of six unique combinations as illustrated in the following figure.


  • TR : Red Triangle

    SR : Red Square

    CR : Red Circle

    CY : Yellow Circle

    SY : Yellow Square

    TY : Yellow Triangle
  • Positioned at the OUTER square of the Arena are four Black Arrows, indicating the Starting Zone for the Bot.
  • At the commencement of each turn, a function generates a shape-color combination. Afterwards, the bot is tasked with navigating to the nearest block that matches the specified criteria from its current position.
  • The heart of the Arena serves as the Home Zone. The Bot's objective is to navigate the Arena, completing a full clockwise circuit and returning to the Home Zone upon successful completion of the circuit.

Approach

  • Leveraged the OpenCV library to implement Computer Vision techniques, including Masking, Erosion, Dilation, Thresholding and Contour Approximation, ensuring precise Image Segmentation from the Arena. This involved extracting and storing all shape-color combinations, including their respective center coordinates.
  • Utilized PyBullet, a renowned physics engine, to simulate the bot's movement within the Arena. Moreover, integrated Aruco Markers onto the bot for real-time tracking of its position at any instant.
  • Used Breadth First Search (BFS) on a directed graph (where edges are created in the direction of allowed movement) to secure all possible paths from the current position to the target destination (which is identifiable through output shape-color combination), selecting the route with the minimum length for the traversal.
  • Implemented a Two Vectors Approach to guide the bot's movement, one indicating bot's heading direction and the other vector between successive grids the bot traverses. User-defined functions such as dist(), ang(), rotate(), and move() are leveraged for maneuvering the bot within the arena.
  • Altered graph edges after the bot crossed the first grid to ensure the bot completes a clockwise round and does not retrace its previous path. The task concludes upon the bot reaching the central home grid.

Installation

It is recommended to set up a virtual environment to avoid conflicts between package versions installed on your system and keep your workspace organized. To create a virtual environment and activate it, please follow the instructions detailed on python venv page. The procedure to deactivate the environment is also provided here.
Before proceeding with installation, please install Microsoft C++ Build Tools.
  • Clone the git repo using git clone https://github.com/asood-life/Vision-2.0.git
  • Install the required packages using pip install -r requirements.txt
  • Obtain additional environment dependencies thorugh pip install -e vision-arena
  • Execute python vision.py to commence the simulation

If you find value in this project, please consider giving it a star ⭐ to show your support. Should you encounter any issues or have suggestions for enhancements, feel free to reach out to me or register them under the Issues section.

About

Autonomous Arena Navigation 🤖 using Computer Vision and PyBullet

Topics

Resources

Stars

Watchers

Forks

Languages