Skip to content

minhaj6/carla-sumo-omnetpp-cosim

Repository files navigation

arXiv

OpenCAMS: AN OPEN-SOURCE CONNECTED AND AUTOMATED MOBILITY CO-SIMULATION PLATFORM

OpenCAMS enables synchronized co-simulation by integrating SUMO for traffic flow, CARLA for high-fidelity sensor simulation, and OMNeT++ for network communication.

Coming soon...

Use Case: Implementation of NIST-standardized post-quantum digital signature algorithms in Cellular Vehicle-to-Everything (C-V2X) communication for intelligent transportation system applications using OpenCAMS.

Citation

If you find this platform useful in your research, please consider citing our paper: OpenCAMS: An Open‑Source Connected and Automated Mobility Co‑Simulation Platform for Advancing Next‑Generation Intelligent Transportation Systems Research

@article{ahmad2025opencams,
  title={OpenCAMS: An Open-Source Connected and Automated Mobility Co-Simulation Platform for Advanced Transportation Research},
  author={Ahmad, Minhaj Uddin and Abrar, Akid and Dasgupta, Sagar and Rahman, Mizanur},
  journal={arXiv preprint arXiv:2507.09186},
  year={2025}
}

Version

  • Carla : 0.9.15
  • InstantVeins: instant-veins-5.2-i1

Note

This environment is tested and verified in Linux and Windows systems.

We are using InstantVeins as a component of the cosimulation, for quick setup. Please make sure the instantveins and Carla in the same network. One way to do that is using the "Bridged Adapter" network mode in VirtualBox.

Go to VirtualBox -> Settings -> Networks -> Attached to : Bridged Adapter.

Computer Hardware

The most resource heavy part of the consimulation is the Carla simulator. The recommended system for the Carla simulator is provided below. This system can run the cosimulation platfrom without any hiccups.

Recommended system -

CPU: Intel i7 gen 9th - 11th / Intel i9 gen 9th - 11th / AMD ryzen 7 / AMD ryzen 9
RAM: +32 GB RAM memory
GPU: NVIDIA RTX 3070 / NVIDIA RTX 3080 / NVIDIA RTX 4090

System used in development -

CPU: Intel i9 gen 14th
RAM: 64 GB memory
GPU: NVIDIA RTX 4090

Running the Cosimulation

The following videos go through the installation process -

  1. https://youtu.be/FmYy6aTucpQ?si=BtcY1etnvzGCWUxR
  2. https://youtu.be/E0PoBPkh720?si=QJvpPN7iW1jc-n7R

Or,

Step 1: Run Carla in your host computer (Tested using Carla 0.9.15)

Note: If host computer is resource constrained older computer, running carla with ./CarlaUE4.sh -quality-level=Low might help

Step 2: Launch the InstantVeins VM.

Step 3: Define SUMO_HOME environment variable. Run echo 'export SUMO_HOME="$HOME/src/sumo"' >> ~/.zshrc

Step 4: Clone this github repository in your omnet++ workspace.

Step 5: Launch OMNeT++ IDE.

Step 6: Import this github repository as a OMNeT++ project.

Step 7: Launch sumo_launchd.py script. Run command: ./sumo-launchd.py -vv -c sumo-gui. If you want to connect additional SUMO clients for any experimentation or data collection, use the flag -n or --number-of-clients. If the number of clients is not mentioned, SUMO starts with expectation of two clients (Carla and OMNeT++). Example for starting with 3 clients - ./sumo-launchd.py -vv -c sumo-gui -n 3.

Step 8: Run simulation on omnetpp.ini from the IDE.

Step 9: Press the run button on the OMNeT++ simulation GUI.

Step 10: Go to carla-scripts directory. Run the run_synchronization.py script with the following arguments. Change the IP address of --carla-host option according to your set-up.

python3 run_synchronization.py --carla-host 10.116.48.5 --sumo-host localhost --sumo-port 49286 --step-length 0.1 --client-order 2 --town-map Town05 --tls-manager sumo examples/Town05.sumocfg --debug

Note: --carla-host command is followed by the IP address of the computer where CARLA is running.

Please use the Github Issues or reach out to Minhaj Ahmad.

This co-simulation platform uses a lot of open-source work done by Carla developers (Carla-Sumo Co-SIM) and Dr. Christoph Sommer (Veins)

Frequent issues

Increasing InstantVeins VM size

InstantVeins uses 20GB of virtual storage, which might not be sufficient as you are developing new things. We can extend the virtual disk space as our project need grows.

It is a two step process.

Increase VirtualBox virtual drive space

  1. Navigate to Tools -> Media in the VirtualBox Manager interface.

  2. Select the instant-veins*.vdi file in Hard disks tab.

  3. Increase the size from the Attributes tab and apply.

Note: the size slider will be grayed out if the VM is already running. You need to power off the VM completely to make this change.

Extend the filesystem to utilize the increased space

  1. Now run the InstantVeins virtual machine and log-in.

  2. Use cfdisk tool to extend the free space. what is cfdisk

sudo cfdisk

resize

write

quit
  1. Install lvm2 package. We need a tool resize2fs. Command - sudo apt install lvm2

  2. Run sudo resize2fs /dev/sda1

Check that the disk is extended. Command - df -h

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors