Difference between revisions of "2019SpringTeam4"

From MAE/ECE 148 - Introduction to Autonomous Vehicles
Jump to navigation Jump to search
Line 27: Line 27:


== Circuitry ==
== Circuitry ==
[[File:circuitrysp19t4.PNG|300px]]
[[File:circuitrysp19t4.PNG|500px]]
<br>
<br>



Revision as of 05:02, 15 June 2019

Introduction

Our project's main objective is to make our car into an autonomous mailman.


Team 4 Members

Kelvin Liu
Wesley Cheung
Zifeng Chen

Project Objectives

Primary Goals
1. Autonomous Driving
Have the vehicle be able to drive autonomously on a track by training it to mimic how a person drives on a track.
2. Color Recognition
In order to specify a designated location for the autonomous vehicle to stop and deliver its package, the team decided to use color recognition. In practice, the vehicle would be able to drive around track until it comes to a location marked with a specific color and recognizing this color marker would result in the car automatically stopping.
3. Package Delivery
Design and program a mechanical arm whose purpose is to "deliver a package". The mechanical arm will activate when the vehicle recognizes a color pattern, which makes the vehicle stop and allowing the mechanical arm to activate and dropping a package at the designated location.
5. Resuming Driving After Delivery
After delivering the package, the vehicle should be able to recognize that after delivering a package, it should resume autonomous driving along the track.
Secondary Goals
1. Number Recognition
After successfully implementing color recognition into the program, the team plans to program the vehicle to recognize numbers instead of colors. Having the vehicle recognize numbers instead of colors will be more difficult, but will allow the vehicle to recognize more unique patterns.

Circuitry

Circuitrysp19t4.PNG

Vehicle Components

Car sp19t4.PNG Image of Vehicle

Base Vehicle

Mechanical Components
Race car chassis frame
Four wheels
Motor
Servo
Drive Train

Electrical Components
Raspberry Pi b+
PWM board
PICAM
Wireless Relay
LiPO Battery


Custom Components

Baseplate
A custom acrylic baseplate that was lasercut and used to mount other mechanical and electrical components to the vehicle.
Base Plate sp19t4.PNG

Camera Mount
A 3D-printed camera mount that is utilized to hold the PI camera in a fixed position while the vehicle is operating. This allowed the camera to record data from a constant point of view. The camera mount is made of two separate 3D-printed parts, a stand and the camera mount. These two parts are held together at a rotatable joint using a M3 nut and bolt. This design allows for the camera's angle to be easily adjusted without having to fabricate another camera mount.
Camera Mount sp19t4.PNG

Raspberry PI Case
A 3D-printed PI case that is utilized to protect the raspberry PI in the event of a crash. The design for this case was taken from a 3D-printing file sharing site at ----. Modifications were then made to the file in order to make adjustments to fit the PI.

Mechanical Arm
This mechanical arm was used to "deliver" packages from the vehicle. It was composed of a TGY1501 H-Torque servo motor and three other 3D-printed parts; a motor mount, arm, and basket. The motor mount's purpose was to attach the servo motor to the base plate. The motor was screwed into the motor mount and the bottom of the mount was layered with velcro to stick to the base plate. The arm part's primary purpose was to connect to the motor's output shaft by having holes that lined up with the motor's own output shaft connector and then constraining the holes together. The basket was connected to the other end of the arm by two M3 bolts and is used to carry the deliverable package. The full mechanical arm was designed such that when the vehicle reaches a designated marker, the arm would simply rotate 70 degrees clockwise and empty the contents of the basket at its designated location.
Deliveryarm.PNG

Autonomous Laps

Indooor Laps
<embedvideo service="youtube" description="5 Indoor Autonomous Laps">https://youtu.be/9WRHqHZoUWc</embedvideo>


Outdoor Laps
<embedvideo service="youtube" description="3 Outdoor Autonomous Laps">https://youtu.be/3yKMGWvzTWo</embedvideo>

Project Results

The team was able to successfully integrate a color recognition system as well as an mechanical arm that allows the vehicle to deliver a package after stopping. The video below is a demonstration of the project progress. The vehicle was able to drive around the track autonomously until it successfully recognizes a block of specified color from a minimum distance. The vehicle would then stop and allow the mechanical arm to deliver the package. While the vehicle was able to recognize a specific color and stop to deliver a package, it was ultimately unable to resume autonomous driving after delivering the package. <embedvideo service="youtube" description="Project Results Video">https://www.youtube.com/watch?v=Cxs0iYWSAdQ</embedvideo>

Project Challenges

1. The vehicle is unable to consistently stop once it recognizes a specific block of color. The team believed that this problem is a result of slow processing of a large amount of data as well as the loss of frames from the camera imaging.
2. In order to account for the slow processing, the vehicle's throttle must be limited so that it can drive slowly enough to to process the camera images and recognize the specified block of color.
3. Currently, the arm is limited to a simple swinging motion at a set speed. When trying to change the speed of the motor arm, it would often cause the autonomous driving program to lag and therefore interrupt the functionality of the autonomous driving program.
4. The vehicle is currently unable to resume driving after delivering a package. This was mostly due to investing a majority of the time in developing the color recognition system of the vehicle and the way the stopping mechanism works with it. Currently, the color recognition program is written such that the the throttle is permanently set to zero once it the camera detects a specific color with an appropriate area. The code was written this way because during tests, the vehicle would often stop for a moment after detecting color, but resume driving quickly after because it would no longer detect the correct size of color block after driving past it. More time and further work would have most likely been sufficient to correct the program and implement the code to allow the vehicle to resume autonomous driving.
5. The steering drive train connection to the servo output shaft would often disconnect, resulting in the vehicle's inability to control steering until it was reconnected
6. The vehicle's wheels had a natural offset that resulted in the vehicle veering towards the right as it was driving. To combat this, the team would often drive in a zig zag pattern along straight paths in attempt to train the model to correct itself from veering off the track along straight paths.

Future Recommended Work