Search code examples
omnet++veins

How do I place road locations made with SUMO?


Instead of using OSM, I used SUMO to create a straight road with four lanes one way.

The simulation environment I want is to use IEEE 802.11p and LTE at the same time. So, Veins and SimuLTE framework are used together, and VeinsInetMobility is used instead of TraCI.

When running the actual simulation, it is located in the blue box as shown below. I want to move it to the red box position.

enter image description here

Do I need to edit omnetpp.ini to move it to the red position? I don't know how to write the code to get the position moved.


Solution

  • SUMO and OMNeT++ are using different coordinate systems -- in fact, OMNeT++ normalizes, then flips SUMO coordinates vertically. For more details see the Veins FAQ entry "Why are the coordinates returned by TraCI methods different from the ones I see in the GUI?" on https://veins.car2x.org/documentation/faq/.

    If you want your vehicles in OMNeT++ to drive somewhere else you will need to change your SUMO simulation. In particular, if you want your cars in OMNeT++ to move further "south" (i.e., down), you will need to move the roads they are driving on in SUMO further "south". To be sure that SUMO does not just remove empty space in the "north" of your simulation when saving the map, you might have to add some dummy road up there, though I did not test this.