Parallel Parking Robot

Introduction and Background

Our aim for this project was to create a hardware-based solution that utilizes two simple rotation inputs - one for the back wheels and the other for the linkage mechanism that successfully achieves a parallel parking motion. This is a closed-loop system where in one full revolution, we aim to achieve one full parking motion. The back wheels are responsible to drive the car backward, whereas the front wheels are driven by the linkage mechanism to steer the car. We intended to use a four-bar or six-bar mechanism to create the approximate output function we desired and then shape it into a more ideal form using gears and dwell mechanisms. Our primary focus was on the synthesis of the output function using the simulation and machine learning models while keeping the hardware side low-cost, mostly using the materials and electronics provided initially. In the end, we were able to create the desired parallel parking motion with some minor caveats.


Design Process

The first step in our progress was determining the general shape of the output function. As our goal was to achieve a parallel parking motion, we wanted the output rocker to rotate sharply to its right extreme position, slowly return to the neutral position, dwell for some time, rotate sharply to the other extreme, and then return to the origin again. This mirrors the procedure that we use when we are reversing into a parallel parking lot—we perform a full lock to the right, straighten our wheels, execute a full lock to the left, then straighten our wheels again. In essence, if we take the angle of our wheels as the output, we would need to create a roughly sinusoidal motion with a dwell point in the middle. We chose a crank rocker mechanism specifically because it converts the continuous rotary motion from the motor (connected to the input crank) to the oscillatory (sinusoidal) motion that we desire. We compared four-bar linkages to six-bar linkages and eventually decided to adopt the former because it allows the car to be more compact and is sufficient to achieve our desired motion. Additionally, we would need to add a gear train to amplify this output motion as it will most likely not be enough to fully rotate the wheels.


To design the four-bar mechanism to create a sinusoidal motion, we first worked on determining the linkage ratios with respect to the ground link to reduce the number of parameters. Next, we used a mix of gradient descent, genetic algorithm, and reverse Monte Carlo method to arrive at the ideal linkage length ratios. In that algorithm, we first generated a pool of Grashof linkages (the original parent genes) and then applied the gradient descent to each. For the reference output motion, we simply generated sinusoidal data with an amplitude of 1. Additionally, the output motions were normalized by their amplitudes and shifted with respect to the x-axis to enable a proper comparison with the datum. Along the process, any mechanism that was not Grashof or exhibited an increase in the residual was discarded. In the end, we further modified the linkage ratios manually for easier manufacturing. From this process, we acquire the linkage ratios of 0.5, 1.25, and 1.5 for a/d, b/d, and c/d, respectively.


Next, we determined the neutral position and the amplitude of the mechanism. It was determined that the neutral position of the linkage occurred when link 2's angular position was at -1 degrees (or when link 4's angular position was at 126 degrees). This data allowed us to precisely specify the attachment point for the output link and its gear. The amplitude of the mechanism was then determined to be about 17 degrees. Accounting for the dwell mechanism, which would reduce this amplitude, we needed a gear ratio between 4 and 5 to turn the wheel by about 45 degrees.


With these initial parameters set, we decided on the electronic systems we planned to use. For the back wheels, the two motors that were provided at the beginning of the course were used to save development time and cost. As we already had the code for the joystick-controlled driving, this had an additional advantage in that one could drive the robot when it is not performing the parallel parking motion. For the input crank, a larger motor with a 12 V input voltage was used to sufficiently power the mechanism. Since there were hefty torque reductions from the four-bar mechanism and gear train, we added a torque multiplier at the start of the mechanism so that the motor wouldn't be overpowered by friction. Minus the voltage stepper and the power supply, all of the electronics were reused from the first assignment.


For the build materials, we opted to mainly use laser-cut woods and acrylics and utilize 3D printings for complex shapes to accelerate the manufacturing and assembling process. The links and front wheels were made from wood, the gears were made from acrylic, while the wheel housings, brackets, and other miscellaneous supports were made by 3D printing. This choice allowed us to quickly recut the parts when we needed a replacement or a redesign. Acrylic was specifically chosen as the material for the gears because it is stronger than plywood, which makes the gear teeth more resistant and less likely to wear and tear or break over time.


Kinematic Analysis

All of the kinematic analysis of the mechanism was done via Python. The analysis of the four-bar mechanism was done concurrently with the linkage synthesis using the analytical solution for that linkage. The velocity analysis was done via numerical calculus to simplify the process. As the dwell introduces discontinuities in both the position and velocity profile of the output, only an approximate analysis was sufficient. As all generated linkages were assured to be Grashof, the crank was able to achieve a full rotation for its mobility condition.

Figure 1. Raw output angle vs. input angle of the four-bar linkage.

Figure 2. Normalized output angle vs. input angle.

Figure 3. Dwell mechanism output vs. input angle.

Figure 4. Angular velocity vs. input angle.

Figure 5. Angular acceleration vs. input angle.


Video 1. Four-bar linkage simulation.


Computer-Aided Design


The CAD of this project was done via Solidworks. Our team utilized the simulations in Solidworks to test our ideas and verify that the gear ratios we calculated before indeed generated the desired output motion. Furthermore, it allowed us to identify potential problems in advance, which would increase the efficiency of our manufacturing and assembly processes. 

Figure 6. CAD assembly.

Video 2. Machine simulation.

Figure 7. Engineering drawings of different parts.


Manufacturing and Assembly

The linkage synthesis and analysis were done rather swiftly, and most of our effort went into manufacturing, assembling, and debugging. We first cut the base plate and attached the four-bar mechanism as a starting point. Although this was originally intended as a placeholder, as the design progressed, we stuck with the original base plate. After that, the holes for the gears, motors, and wheels were drilled, and the gear train was mounted on top. Since most parts were laser cut, their dimensions were not exact, and we had to recreate the same part with minor adjustments continuously. Due to this reason, bearings were omitted to allow for a more simple procedure, which was tolerable as the friction in the joints was not quite high to cause operation issues.

Figure 8. Basic assembly.


After this point, the wheel mounts and housings were printed and then mounted alongside the parallel four-bar mechanism that linked the two front wheels together. Similarly to links, the gears had to be cut multiple times as their alignment had to be quite more precise than other mechanical parts. Our team decided to cut multiple sizes of gears, which differed only in small increments from each other, to ascertain the best fit for the gears to be meshing with each other smoothly. Before mounting and connecting any of the electronics, we tested the mechanism by hand cranking it to ensure that our hardware was functional. The dwell mechanism was added later by grinding away some of the teeth in the driver gear. At a neutral position, this allowed the car to drive freely using the previously established joystick control.


Electronics and Software

For the motor speed control, simple H-bridge boards were used - one for the back wheels and one for the input crank. Along the way, we faced a problem powering the main crank motor due to the Arduino board being unable to provide the higher voltage required. For this reason, we connected the crank H-bridge directly to the wall socket, and this voltage was then stepped down for other parts to operate. Besides this, since the aim was to achieve simplicity in the electronic and software system, no other major issues occurred.


On the software side, we had to manually tune the speed and the duration of the motor activation as it did not contain an encoder. After many attempts, we reached an approximate point where the motor would reliably rotate one full rotation for the parallel parking. Additionally, an unforeseen problem with the dwell occurred, in which the gears got stuck during the transition between the dwell and movement. To compensate for this behavior, we added a simple jerk motion to the crank motor. Although this was not aligned with the initial goal of simplistic software, it was too late to fix the hardware design and reassemble the whole mechanism.


GitHub Link: Link


Final Prototype

On the day of the presentation, our car was able to achieve a near prefer parallel parking on the first attempt. However, due to roughly tuned software, the car was not able to reliably recreate this result in the subsequent runs. Overall, we deem our design and concept to be a success, although the mechanical assemblage can use a rework. 


Video 3. Final presentation.


Conclusions and Future Works

Reflecting on our project, one area that we could have improved upon is the mechanical hardware to make the prototype more robust. Professor Deshpande pointed out in the demonstration that the rotation of our revolute joints would be smoother if we had used bearings and unthreaded screws. Furthermore, due to some of our parts being 3D-printed, the tolerances of through holes could have been better, which would result in less play between some of the connections. As for the gear teeth, we could have enlarged the size of the gear teeth by the kerf of the laser cutter itself. This would allow a better meshing and may have prevented the situation of gears being stuck during the transition between dwelling and movement. If the gears were laser cut with some parts of the teeth taken out prior in the Retina Engrave design, that may have made the transition more accurate as well. With more experience, we would have also been able to foresee the problems powering the main crank motor and address that ahead of time. If we were to upgrade our prototype and improve it further, one potential area we could explore is that of making an autonomous parallel parking robot. We could attach ultrasonic sensors to measure the distance away from the parking lot, which would be converted to motor inputs so that the car can park itself, regardless of how far it is away from the parking lot. In conclusion, we believe that this project was a successful and fruitful one, where we achieved our original goals and learned many insights about mechanical design and robotics along the journey. 


Appendix

(Bill of Materials.)