Overview:
Here's the overall idea for a 2D-viewed obstacle avoidance algorithm.
Workspace (Initial and Final Points) | Object Detection and Blocking Out Obstacles |
Grid Modeling and Extracting Key Path Points | Trajectory Generation |
For using the Yolo-V5 we're going to take the following steps (Reference #1):
- Python Virtual Environment Setup
- Installing Pytorch and Cuda
- Use the Default Yolo-V5 Model
Step 1: Python Virtual Environment Setup
it is advised to setup a virtual environment before using Pytorch and Cuda.
Step 2: Installing Pytorch and Cuda
First go to the Pytorch Local Installation address. In the following section choose the appropriate installation version for your computer. Copy the output command and run it in your Virtual Env.
For installing the GPU-activated version you'll need cuda which you can find in the CUDA Download Page
Step 3: Use the Default Yolo-V5 Model
The following jupyter notebook contains the code necessary code for using Yolo-V5 for a given image under the section "Object Detection".
A search algorithm that is typically used for finding the path in graph, or in this case a grid-world, is called Breath-First Search (BFS) Algorithm. The following jupyter notebook contains the code necessary code for using BFS Algorithm in a grid-world under the section "Grid Search".
BFS Algorithm (img ref) | BFS algorithm grid-world implementation |