Tank (Total Annihilation Not Komplete)
First, we created UI prototype in Figma which included all the necessary screens for out features. We then recreated the screens in Android studio xml layout files. We then initialized UI elements in Java code and connected them to the backend so that MQTT messages were sent when the user was interacting with the UI elements.
We used the Smartcar library to program an emulated version of the smartcar which connects to an Android app through the MQTT protocol. MQTT messages are used to publish and subscribe between the car and the Android app made with Android studio.
We used OpenCV to process a dataset (positive and negative images of the car) and then ran a training process to teach a cascade classifier. This cascade was then used to detect the smartcar objects on the camera feed from the smartcar.
Tutorial can be found here.
To design our software we used the Model View Controller pattern. The Model is the SMCE smartcar that contains all of the business logic. The UI (View) was created in Android studio using XML files. Finally, the Client class acts as a controller and allows to update the the state of the smartcar through the Android app. The commands from the Android app were sent using an MQTT broker. The app connects to localhost by default but it also allows the user to switch to a custom broker instead.
We used the following sensors for this project:
Sensor | Usage |
---|---|
Ultrasonic sensor | Obstacle avoidance in othercars.ino |
Infrared sensor | To give user a score each time they crash into another car |
Camera | To train our cascade classifier, and to stream from the car |