AmI Bus
View on GitHub

AmI main steps

The four main steps of all AmI systems

Sensing

Using infrared sensors mounted on the side of each door, the system is able to update in real time the number of people inside the bus. Moreover AmI Bus can determine through video analysis the less crouded door in order to make it easier for people to get in. It also keeps track of the position of the buses and users using the integrated GPS of smartphones.

Reasoning

According to the data gathered the system will understand when the user needs to take the bus and which is the best combination for him to take in order to arrive on time and in a not too crowded bus. Moreover it will decide using sensors data which door will be used to let passenger get off.

Acting

The system will facilitate the flow of people entering the bus using both speakers and lights inside the bus and at the bus stop to communicate with users which is the less busy door to use to enter the bus or to exit.

Interacting

The user, thanks to a mobile application, can interact with the system setting his preferences for the trip, like for example the preferred bus line, the maximum waiting time, the maximum distance to walk, the support for wheelchair and so on.

About

A short description of our project

Have you ever been late to your appointments because the bus arrived late? Or maybe it was just too packed to even try to get on? Anyone that lives in a crowded city and uses buses as his primary mean of transport for sure will identify himself in a similar situation. AmI-bus is here to help you to solve these problems!
Our system will give you a better experience using public transport. It is capable to understand in real time where all the buses are and how full they are and will use these informations to help you reach your destination in the fastest and more comfortable way.
AmI-bus is a solution suited for you, the system can learn your appointments using data from your calendar and your current position to combine them with the information taken from the sensors on the buses. Then it will reason on them and will be able to suggest the best time and route to follow according to your personal needs!
The user can also interact with the system setting his preferences for the trip in order to be served in the best possible way. Finally, to help users getting on the bus, the system will interact with the space around you. It will be able to recognize which doors are more empty and open only these ones. It will warn the people inside the bus to move away from the doors through speakers and lights, and at the same time signalling to the users waiting at the bus stop from which door will be easier to get in with lights signals on the outside of the bus in correspondence to each door.

AmI Bus Features

Sensitive

AmI-bus will sense the position of users, their disposition inside the bus, their number and the position of the buses.

Responsive

The system will understand in real time when there is a bus or a combination of them suitable for the user needs and preferences and acts accordingly to that information.

Adaptive

AmI-bus can easily modify himself to satisfy the specific needs that any user can set using preferences.

Ubiquitous

The system will be gather data from each bus and each users.

Transparent

The system can understand which are the need of the user as well as its position and will guide him to destination autonomously.

Intelligent

Users no longer need to worry about planning their movements, AmI-bus will handle this process for them!




  • Priority 1:

    1. AmI-bus is able to detect the number of passengers inside each buses

    2. Our system uses positioning data to know at each moment where all the buses are, and also to get the location of the users

    3. Knowing the current situation it can intelligently compute the best transport solution for each traveller in terms of time and crowdedness

    4. The system may incorporate information from online calendar

    5. AmI-bus interact with passengers using speakers to sends signals in response to the situation (tell passengers to move away from a specific door if occupied or which is the chosen exit door to let them reach it in time)

    6. The system also adopts lights with changing colors both inside and outside of the bus, to communicate visually to users which is the entrance or exit door to be used

    7. It has a dedicated mobile app to allows the registration of a new user, login and use of the system

    8. Our system can change the computed solution according to user preferences such as preferred line or maximum occupancy tolerated


  • Priority 2:

    9. AmI-bus sends notification to user phone when he needs to start his journey because the bus is going to arrive in the nearest bus stop

    10. It is able to gather information on the position of passengers in the bus using cameras

    11. The system to facilitate the flow of people, both getting in the bus and exiting from it, will decide which is the best door to open to let them in/out

    12. The system shows graphically to user the position of the buses and "level of occupancy"

    13. Using the calendar events stored in the system, it will plan in advantage the routes and notify the user when he has to leave


  • Priority 3:

    14. AmI-bus may include different means of transport (TObike, taxi, etc…) to give user a more complete experience

    15. The system will signal to the user when he reaches his stop with possibility of different means (notification on the phone, audio with speakers, visual with lights)

Architecture

System architecture and materials




Hardware Architecture
Microcontroller placed inside each bus to handle most of the sensors (infrared sensors and cameras) and devices (speaker and color changing lights) inside of it
Driver’s smartphone to get the location of the bus and to interface with the ambient devices
User’s smartphone to get the location and user preferences
Central server that handle the communication with all the other computational nodes, stores the data and process the routing
Infrared sensors placed on the side of each doors to detect the number of people getting through them
Digital cameras to determine if the area beside each door is occupied or not, to decide the entrance/exit doors
Speaker in the bus to produce audio messages for the passengers
Color changing lights both inside and outside each door to visually communicate the entrance and exit doors


Software Architecture
the central server will be implemented with Flask and will run on a single computer. It will:
-receive location data updates of both the user and the bus
-receives update on the number of people in the buses
-receives the requests from the user application
-use an external service api to calculate the routing
-run the software to calculate the best routing solution for time and crowdedness
-stores the user calendars
-run the software to process the events stored and the push notification to the user
the user application will be deployed on android and will get the current location, the user preferences and will be the interface between the central server that computes the routings and the user
the driver application will also be deployed on android and will send the location and interact with the microcontroller inside the bus to communicate when to execute the routines for the optimal decision and communication of the chosen doors and for the opening of them
the microcontroller run the software to choose the more empty door performing a video analysis of the environment inside the bus, and the software to count the number of passengers using the infrared sensors. It also implement a web server in Flask to communicate information with the central server and to receive messages from the driver application


Network Architecture
The microcontroller will be wired to the ambient sensors and ambient devices
The central servers should be accessible from everywhere with http connection and so with a public ip address
The driver phone and the microcontroller communicate with Wi-Fi so need to be on the same lan
Finally all the other computational nodes communicate with the server using http

Purpose and Scope

Here's what we're gonna do

The goal of the system is to support the user whenever he needs to move from one place to another ,Ami bus will read the activities on the user's calendar in order to advice him through notification when it's time to catch the bus.When it comes to user interaction,there will be an android mobile application that will let the user set is current and final position and his preferences of occupancy for the trip in order to receive the best route solutions. Then through REST Api call to the server it will receives and display to the user all the information useful to reach the destination. Sensors placed on the bus will collect data on the number of passengers entering and leaving the bus to know in real time how full they are in order to detect the less crowded one. The system will activate speakers and lights placed inside and outside the bus to warn passengers to move away from the doors and it will indicate to the user the door to use to enter or leave the bus.

Hardware Components

Here's what we're going to need

  • Central Server: HP laptop

  • Microcontroller: Raspberry Pi 3 Model B

  • Infrared Sensors: e18-d80nk

  • Cameras: GENERIC USB web cam

  • Lights: Philips Hue

  • Speakers: Bose Soundlink mini





Software Components

Here's what we're going to need

  • Python: 3.7

  • Flask: 1.0.2

  • Wi Fi: 802.11

  • Android OS: API level 28


Open Issues

We would like to do these... but how?

  • While trying to demonstrate the project, certain difficulties may arise. First of all we must take into account the fact that each of the vehicles operates in their own specific routes while the test only focuses on only one. Moreover, demonstrating the study in class has its physical limitations, not being able to show it first hand on the vehicle. Another issue may be the fact that certain passengers may not have Bluetooth enabled on their devices, making the study inconsistent. .

Our Team

Four students from Politecnico di Torino

Francesco Pizzato

Software developer

s235450@ studenti.polito.it

Ovidiu Ionescu

Software developer and Web Designer

s264493@ studenti.polito.it

Gianluca Santuz

Hardware developer

s235369@studenti.polito.it

Nicola Pepe

Hardware developer

s236143@ studenti.polito.it

Please, for any question or suggestion feel fre to contact us!