DIT112-V21 / group-10

MIT License
3 stars 2 forks source link

DIT112 - Mini Project - System Development (Group 10)

MainScreen ManualScreen

Table of Contents

Demo Video

Tank (Total Annihilation Not Komplete)

What did we make?

Why did we make this? What problem was solved?

How did we make this? What kind of technology and resources have we used?

Front-end

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.

Back-end

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.

Technologies:

Resources:

Game Tutorial for Users

Tutorial can be found here.

"Get Started" Guide for Developers

  1. Download and install SMCE, and Android Studio, using the following setup instructions for SMCE
  2. Download/clone remote repository from GitHub
  3. Go through following README.md to know how to prepare development environment for respective part
  4. Open and compile smartcar.ino in Arduino IDE and SMCE
  5. Open and compile othercars.ino Arduino IDE and SMCE
  6. Open android folder in Android Studio, build and run it

Software Architecture

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

Development Team