Mobile Robotic Control Research
Problem:
Two robots were being used to simulate the flow of traffic, with one robot being the lead and the other being a follower. The robots being used were Pololu 3pi+ 32u4. One robot followed a set pattern of varying speed, and the other robot used an ultrasonic sensor to keep a set distance. The robot that was following the set pattern was supposed to travel in a straight line, but something was causing it to veer off course. This caused the follower to ‘lose sight’ of the lead robot.
Action:
Code was written in Arduino to
-
Analyze robot’s left and right motor movements
-
Calculated the revolutions of each motor at time 1 and time 2
-
Calculated the angular displacement of the motors at time 1 and time 2
-
Calculated the angular velocities of each motor
-
Displayed all values in an easy-to-read manner
Another script was written in Arduino to
-
Receive time stamp and angular velocities of both motors
-
Use values to find difference in angular velocity
-
Find the percentage that the velocities were the same
-
Calculate an error value which was then added to the speeds of the left and right motor to try and increase the number of times the angular velocities of the motors were the same
Result:
An error value of two produced the best results having the angular velocities being the same 53.5% of the time and an average difference of 0.087 rad/s difference between the left and right angular velocities. This new code with the error being added to the motor speeds caused the lead robot to travel in more of a straight line than before, allowing the second robot to follow.
​
​
Sample of Code Written
Example of Code Output