A group of 6 like-minded people ready to tackle any challenge!
For more info on how we tackle the challenge, have a look at our wiki!
We are proud to present our app Crusher's Crash Course to you:
https://www.youtube.com/watch?v=sFfU1-JhVWo
- Introduction
- Installation Manual
- How to use our mobile app
- Learn more about our app
- 4.1. Software Architecture
- 4.2. Hardware Architecture
Crushers is dedicated to prepare you to crush the test, the theoretical drivers license test that is. We are going to do so by providing an app which quizes you on the traffic laws, signs, and scenarios. Our app will provide you with explanations, visual illustrations, and a hands on manual driving mode to give you the full experience and prepare you like you have never before been prepared for a test.
The simple reason why we assigned ourselves with this mission is the fail rate for the drivers license exam, theory and driving. Keeping calm and focused in a busy and noisy environment as the road, especially within cities, can be difficult and leads to accidents yearly. Some accidents, however, could be mitigated through better knowledge of driving theory. To date most apps focus on the theoretical exam, but our goal is to combine the theory with visual illustrations showing why a certain traffic law/sign is necessary and a manual driving mode in a virtual city to also train you for the driving test.
What problem it solves
Fail rate of drivers license exams in Sweden (2021)
source: https://korkortonline.se/en/facts/statistics/
To accomplish our goal, we will create a remotely accessible api for the car, provide our end users with an android app, and lastly create a city environment for the emulator for the manual driving and scenario demonstrations. The main focus for the project will lie on the app, and depending on the time available at the end we have some cool ideas for the emulators city environment.
What kind of technology we are going to use
Component | Technologies |
---|---|
Car controller | Arduino, C++, smartcar shield |
Car - App communication | MQTT |
App | Android, Java |
City environment | SMCE, Blender, etc. |
-
- Windows: 10 or newer
- MAC: OS Big Sur or newer
- Linux: Ubuntu 18.04 or newer
-
- Android: pie (9.0) or newer
-
We strongly recommend a computer fewer than 5 years old
- Processor: Minimum 1 GHz; Recommended 2GHz or more
- Ethernet connection: (LAN) OR a wireless adapter (Wi-Fi)
- Hard Drive: Minimum 32 GB; Recommended 64 GB or more
- Memory (RAM): Minimum 1 GB; Recommended 4 GB or above
- Sound card w/speakers
-
We require an MQTT broker in order to be able to drive via app. There are a variety of MQTT brokers to choose from, however we choose Mosquitto for our needs.
-
What exactly is an MQTT broker?
It is a software running on a computer. it could be any computer, from raspberry pi to a pc to a server. Broker is available as either open-source or proprietary with extra features added on. Broker acts like a post-office, where instead a device sending a message to or getting a message from another device directly. They send to post- office (broker) and then it is forwarded to everyone that needs that message. -
Why do we need a broker?
We will need a broker to connect the app to the SMCE so we can practice driving. -
How may a Mosquitto broker be set up?
Here's a clear explanation for how to download Mosquitto. Choose your operating system and follow the instructions:Download Mosquitto
-
-
We need to download SMCE (the car environment), which will allow you to practice and improve your skills.
- How are we going about doing it?
Please see this page for instructions on how to install SMCE on MacOs, Windows, or Debian based Linux
- How are we going about doing it?
-
Find our project in the current release
- As a developer, you must first download and install SMCE, a MQTT broker, as described here
- Download and Install JDK 11
- 2.1. Go to link. Click on JDK Download for Java based on your operating system download JDK 11 latest version.
- 2.2. Once the Java JDK 11 download is complete, run the exe for install JDK. Click Next.
- 2.3. Select the PATH to install Java in Windows. You can leave it Default. Click next.
- 2.4. Once you install Java in windows, click Close.
- Installation for JDK here is for Windows. If you are using a different operating system, go here for Mac and here for Ubuntu.
- Set environment variables
- 3.1. Right Click on the My Computer and Select the properties
- 3.2. Click on advanced system settings
- 3.3. Click on Environment Variables to set Java runtime environment
- 3.4. Click on new Button of User variables
- 3.5. Type PATH in the Variable name.
- 3.6. Copy the path of bin folder which is installed in JDK folder.
- 3.7. Paste Path of bin folder in Variable value. Click on OK Button.
- 3.8. You can set CLASSPATH in a similar way.
- 3.9. Click on OK button
- Download and Install Android Studio
- 4.1. To download the Android Studio, visit the official Android Studio website in your web browser.
- 4.2. When you have finished downloading Android Studio, double click on the downloaded "Android Studio-ide.exe" file.
- 4.3. "Android Studio Setup" will appear on the screen and click "Next" to proceed.
- 4.4. Select the components that you want to install and click on the "Next" button.
- 4.5. Now, browse the location where you want to install the Android Studio and click "Next" to proceed.
- 4.6. Choose a start menu folder for the "Android Studio" shortcut and click the "Install" button to proceed.
- 4.7. After the successful completion of the installation, click on the "Next" button.
- 4.8.Click on the "Finish" button to proceed.
- 4.9. The welcome screen for Android Studio will now appear on the screen.
- Installation for Android Studio here is for Windows. If you are using a different operating system, go Android Studio official website for both Mac and Ubuntu.
- Clone the repo:
git clone https://github.com/DIT113-V22/group-01.git
- Open our project in Android Studio
- Start working!
Before using our mobile app, you need to run mosquitto in order to establish connection between car and our app. Question arises, HOW?
These methods apply to Windows, MacOS, and Ubuntu
- To start the broker, open a command prompt (Terminal)
- In the command prompt, navigate to the Mosquitto root folder.
- tart the Mosquitto service by running the command:
net start mosquitto
. - Acknowledge the message: The Mosquitto Broker service was started successfully.
- Open the "SMCE" shortcut.
- The start screen for SMCE will now appear on the screen
- Select the
Start Fresh
button and then the+
sign on the next screen. - Click on
Add new
. - Select the Arduino folder's location and open it (file with the
.ino
extension). - Click on
Compile
, on top left and wait. When the build succeeds, you will be told; if you want to keep an eye on things, open theLog
window next to thecompile
button. It's also where you will find compilation errors if something goes wrong. - Then press
Start
. You will notice that a car has appeared and that the attachment list has been filled. You should notice text being printed out if you open theSerial
window on the bottom left. - Enjoy driving!
Here's a .zip
file that gives you the option to adjust the SMCE environment. Add the .zip
file to the mod folder in the SMCE user directory.
you can find the user directory in these places:
- Windows:
%APPDATA%\Godot\app_userdata\SMCE
- macOS:
~/Library/Application Support/Godot/SMCE
- Linux:
~/.local/share/godot/SMCE
- Click the top left hamburger menu
- Use the world dropdown to select Lindholmen
- Welcome on campus
If you have any questions, you can look up the instructions for altering the environment in SMCE.
Now that you have installed our app, check out the user manual to learn how to use it
An overview of our project's structure can be found here We designated to UML diagram and EER diagram, which show our program's and database's structure in greater detail, respectively.
Deployment Diagram: This diagram depicts how the components communicate with one another at a high level of abstraction.
In this section we will talk about SMCE environment. We use a variety of features for various applications, which we shall discuss in further full detail.
-
Sensors
Ultra Sonic: The car comes equipped with a number of useful sensors by default. Pins 6 and 7 are connected to an ultrasonic sensor (SR04) on the front of the car with a long range in the default setup. This sensor is used to identify obstacles. The car will come to a halt if an obstacle is within 60 cm.
Infrared: This sensor is used to measure distances on the sides of the car between 12 and 78 cm. Their range is limited, but they are more precise and quick. In general, there are four infrared sensors on the car, front, back, left, and right.
Odometer: Two directional odometers, one on each side, that track the distance traveled by the vehicle. In contrast to their directionless cousins, these sensors normally reveal three signal lines. The direction of movement can be deduced based on the status of this third signal.
Gyroscope: gyroscope that can give you the car's direction in degrees [0, 360]. Clockwise movement increases the degree count, while counter-clockwise movement decreases it.
Camera: The car has a camera that may be used to transmit what it sees. It reads a frame from the camera every 65 milliseconds and copies it into a frameBuffer. This is then sent out to the Android app via the MQTT protocol. -
The current configuration for the smartcar has these attachments:
- 4x infrared sensors
- 2x odometer sensors
- 1x gyroscope sensors
- 1x ultrasonic sensors
- 1x camera
- 2x brushed motors
-
Car shield library structure (for developers):
The purpose of this page is to provide instructions on how to use the library's API, including explanations and examples for each exposed method.