Vacumm Cleaner Development Part 2
This is the second part of the vacumm cleaner, this time our objective is to make the robot the most eficient we can.
My first idea to make it more efficient was to implementate the spiral movement that is suggested on the JdRobot Academy page.
The robot function:
1. Start making the spiral move until it detect with the laser an object
2. When an object is detected it would start a random move around the house.
3. After a while the robot would check the laser if there is no object close around it would start again making the spiral move.
Making the spiral move was not so dificult i only have to follow what is mentioned on de JdeRobot web. I decide to implement the case of increment the linear velocity instead of decrease the angular velocity.
The rest of the code was basically what i have on the part 1 but this time i delete the case of going backward, now if it collides the robot would turn a random amount of time, it would turn to one side or the other depending of wich side is more close to the object. This is the result:
Also when the robot start the spiral mode it would start increasing its lineal velocity, but What happenwhen it dont detect nothing? It would increase its velocity infinitely? Well no when it reaches a maximun velocity it would stop turn to the oposite direction of the spiral for a small amount of time, then it would go forward for another amount of time and then it would start spiral again from the initial velocities. Thats how the robot dont start to move so fast.
The maximun % of house clean i could get was 67%.
A demostration of how it begins:

Comments
Post a Comment