Entradas

Mostrando entradas de noviembre, 2022

Obstacle Avoidance

Obstacle avoidance In this practice we have an avoiding obstacle formula 1 using the VFF algorithm as objective. The VFF algorithm consist on getting repulsive and attractive forces that will represent the mobility system of our robot; getting a final force as result which will represent the angular and linear velocity for a safe navigation.  The attractive force: For the attractive force, we will get the relative position of the goal to our robot. This will represent a vector which we will normalize and use as the attractive force.  The repulsive force: This was the hard one. For getting this force, firstly we must parse the 180 measures that the laser give us in order to get the information that we want and delete the noise; then, we will transform that treated measures to a normalized vector that will have the opposite direction and sense to the object that we want to avoid. The total force: This is the final force that will have the form (lineal_velocity,angular_velocity). In order

Vending machine

 This solution is on beta phase. I was not able to finish the exercise but I could nearly complete the "Arranque" and "Servicio" parts. For this exercise 2 leds are needed but i just use the led that is at the arduino board, at the left of the digital 13 pin.  You can see a demo here  Remember that this is a beta and the full solution will be uploaded soon. 

Follow Line Formula 1

Imagen
Follow line In this practice we will use PIDs in order to create a program which will allow us to drive a formula 1 car efficiently following a line. What are we going to use? 1) A color filter for getting the line position      We are going to use the opencv library to get the position of the center pixel of the line but, we are not going to use all the line, we will just use the top part of the line in order to get a pixel which will give us more info for the turning and speeds PIDs You can also see the picture here 2) Two PIDs -Linear_pid: This pid is jut going to give us a proportional output linear speed that we will subtract to out maximum linear speed using the center pixel of the color filter that we defined before.  -Angular_pid: This pid is going to give us an angular speed but this time we well use the kp, ki and kd components 3) A recovery condition An extra condition that basically will search the line turning to the last direction at it was and will reduce our speed to th