riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 131 forks source link

Omnet not showing correct car node coordinates #216

Closed rdn123 closed 3 years ago

rdn123 commented 3 years ago

I am running my own simulation on Artery and everything works fine except that the simulation does not show the correct position for my car node, what I mean by this is that Omnet does not show the correct coordinates that the vehicle has in SUMO. The RSUs that I have positioned are perfectly located, the problem exists only on the simulated car and only in the position as the speed is well represented.

Where can the problem come from?

riebl commented 3 years ago

Are the coordinates shown by World.node[x].mobility.mPosition as expected?

rdn123 commented 3 years ago

Thank you for the fast replay! No, those coordinates are wrong but World.node[x].mobility.mSpeed is as expected.

riebl commented 3 years ago

Do the shipped scenarios work correctly, e.g. make run_example? Can you detail what is different in "your own simulation"?

rdn123 commented 3 years ago

Yes the scenarios work perfectly and I used them as orientative. In my simulation everything works fine, my SUMO file works fine and every other parameter is well reflected in Omnet, is just the position of the vehicle that in my case is node[0] it even takes correctly the mVehicleId.

My simulation is just a vehicle and a RSU transmitting CAM messages to each other and I used the shipped scenarios as guidance, specifically "rsu_grid" and "highway-police". What is the file or the variable that controls how the position is read from my SUMO simulation?

riebl commented 3 years ago

Artery fetches the vehicle coordinates from SUMO via TraCI. Since this mechanism seems to work with other scenarios just fine, I suppose something is odd with your custom SUMO network. When you open your scenario standalone with SUMO GUI, do you see proper coordinates in the status line of the window (x + y and lat + lon)? These coordinates represent the position of your mouse cursor on the map, i.e. should change when moving your mouse around.

rdn123 commented 3 years ago

Yes when I open my scenario with SUMO GUI the coordinates are as expected and they change as I move the mouse. I guess maybe I have something wrong in the init file or in some other file?

riebl commented 3 years ago

You seem to experience a very strange error. I don't suspect that your omnetpp.ini configuration is wrong because SUMO is started correctly and you see the correct vehicle ID but not the correct position. Can you share your scenario with me, e.g. by uploading it to GitHub or sending it to me via e-mail privately?

riebl commented 3 years ago

@niturbe Please use raphael@riebl.net