Práctica 4: Global Navigation using Teletaxi
Welcome!
Goal:
In this exercise we are going to implement the logic of a Gradient Path Planning (GPP) algorithm, which consists of:
- Selecting a destination, the GPP algorithm is responsible for finding the shortest path to it, avoiding, in the case of this practice, everything that is not road.
- Once the path has been selected, the logic necessary to follow this path and reach the objective must be implemented in the robot.
Explanation:
First, we have to built a gradient map assigning weights to every cell between the beginning and the target we want to reach.
I have choose 2 different values for the weights: 1 for cardinal directions (north, south, east and west) and 1.25 for the intermediate directions (north-east, south-east, north-west and south-west).
Next, we have to binarize the map (binarize_map() method) from where we obtain only 2 values, 0 if it´s an obstacle and 255 if it´s road. All the data obtained is copied into a numpy array of zeros.
Then, we use the previous numpy array to fill the gradient (using the fill_gradient() method), where I have used a Queue to pop or push the values in the gradient depending if they are or not obstacles in the way.
We always put the lower values in the array. If we have reached our objective, we add some extra iterations to give the car some more maneuvering time so that it can hit the target correctly.
With the obstacles list obtained in the fill_gradient() method we have taken into account all directions and corners in the map.
Next, we have to get a path, and for this task I have used the path_extraction() method, and with their values assigned using the assign_weights() method we iterate from the initial point to the target we want to reach in the map.
Finally, to make the car move, I have used a similar method from the 3rd practice of the subject (obstacle avoidance), where I have used only attractive forces, no repulsion forces are needed here because the obstacles are obtained in the fill_gradient method().
MULTIMEDIA CONTENT (SIMULATION IN UNIBOTICS):
Image: View of the map and the gradient
Picture 3(1). Environment visualization
Picture 3(2). Environment visualization
Video: Execution of the program
Picture 4. Execution of the program



Comentarios
Publicar un comentario