Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Simulation of Cars using SUMO and OBU/RSU for Car To Infrastructure and Infrastructure to Car communication

Notifications You must be signed in to change notification settings

5g-mobility/car-communication

Repository files navigation

Cars Simulation with Sumo

Simulation of the movement of cars in the Costa Nova and Barra area using Sumo and Python to simulate all the data flow in a real situation: Car -> RSU -> Broker and RSU -> Cars

After running, the data will eventually be available at the MQTT Broker broker.es.av.it.pt in the topic its_center/inqueue/5g-mobility

The data generated includes:

  • Timestamp of the event
  • Vehicle Id
  • Position of the vehicle
  • Vehicle speed
  • Vehicle emissions
  • Temperature outside according to vehicle sensors
  • Light capture indication according to the vehicle's sensors
  • Rain indication according to vehicle sensors
  • Indication of the existence of fog according to the sensors of the vehicle

Run on Docker

  1. Build the Docker image
docker-compose build
  1. Run the simulation
docker-compose up -d

Run on your environment

Make sure you are running Python 3.8 or higher

  1. Create a virtual environment (venv)
python3 -m venv venv
  1. Activate the virtual environment (you need to repeat this step, and this step only, every time you start a new terminal/session):
source venv/bin/activate
  1. Install the game requirements:
pip install -r requirements.txt

How to run the application

First, you need to have sumo installed on your computer. Follow the link, if sumo isn't already installed.

  1. Run the Road Side Unit (RSU) program
python rsu.py
  1. Run the simulation program
python simulation.py

About

Simulation of Cars using SUMO and OBU/RSU for Car To Infrastructure and Infrastructure to Car communication

Topics

Resources

Stars

Watchers

Forks

Languages