brianmc95 / OpenCV2X

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

Mode4 and Mode4Validation error "Cannot remove old output vector file" #11

Closed dalego1997 closed 4 years ago

dalego1997 commented 4 years ago

Hello @brianmc95 ,

I have been trying to execute both Mode4 and Mode4Validation and once I have selected the configuration the following error appears:

image

Other simulations from the lte project work with no problem. I have the sumo-launchd.py opened as I would do to execute the Veins example.

image

What may be the problem? I would like also to say that I have no folder namec C:/hdd. I am using Windows 10.

Thank you very much!

brianmc95 commented 4 years ago

Hi @dalego1997,

What I think is happening here is the fact that I have fixed paths in the omnetpp.ini file which is causing you an issue.

if you update the file specifically the output-vector-file and output-scalar-file to wherever on your system you'd like to store your results it should work correctly.

A bit of a heads up I'd recommend if at all possible to use linux for the model, it's what I personally use and as such if you run into issues I can be a bit more help. But of course if it's not an option work away and I'll do my best to help out where I can.

dalego1997 commented 4 years ago

Hello @brianmc95 ,

First of all thanks for your quick answer. Indeed, this was the problem. I have changed the directory and this problem have been solved. I am new with OMNeT++, Veins and SimuLTE, so I am just trying to put everything to work and then to analyze properly each simulation.

The point now is that I face an error with the TraCI module once I run the simulation.

Logging to c:/users/daniel~1/appdata/local/temp/sumo-launchd.log
Superfluous command line arguments: "▒c sumo.exe"
Listening on port 9999
Connection from 127.0.0.1 on port 52287
Handling connection from 127.0.0.1 on port 52287
Got TraCI message of length 2
Got TraCI command of length 1
Got TraCI command 0x0
Got CMD_GETVERSION
Got TraCI message of length 297
Got TraCI command of length 292
Got TraCI command 0x75
Got CMD_FILE_SEND for "sumo-launchd.launch.xml"
Got CMD_FILE_SEND with data "<launch>
  <basedir path="/home/brian/git_repos/simulte/simulations/Mode4/highway/fast"/>
  <copy file="fast.net.xml"/>
  <copy file="fast.rou.xml"/>
  <copy file="rerouters.add.xml"/>
  <copy file="fast.sumo.cfg" type="config"/>
  <seed value="0"/>
</launch>
"
Creating temporary directory...
Temporary dir is c:/users/daniel~1/appdata/local/temp/sumo-launchd-tmp-j7wzss
Base dir is /home/brian/git_repos/simulte/simulations/Mode4/highway/fast
Seed is 0
Finding free port number...
Claiming lock on port
...found port 52288
Releasing lock on port
Cleaning up
Result: "None"
Aborting on error: file "/home/brian/git_repos/simulte/simulations/Mode4/highway/fast/fast.net.xml" does not exist
Closing connection from 127.0.0.1 on port 52287

I bet the problem is some file of the lte module which is configured to work with sumo-launchd with your directory but I can't find where it is.

I appreciate your help, and again sorry if these are silly questions!

brianmc95 commented 4 years ago

No worries happy to help out where I can!

So you're right it's actually the fast.launchd.xml file in the highway/fast directory and specifically the following <basedir path= part is set to another absolute path, swap it to the path to this directory on your system and it should start working again.

dalego1997 commented 4 years ago

Hi @brianmc95 ,

You are totally right, I now understood how it works. Thank you very much, you are helping me a lot.

Now, I execute the simulation Mode4 with Base mode and after a while it just crashes, giving the following errors:

Temporary dir is c:/users/daniel~1/appdata/local/temp/sumo-launchd-tmp-ycd9qk
Base dir is C:\src\latest_simulte\simulations\Mode4\highway\fast
Seed is 0
Finding free port number...
Claiming lock on port
...found port 52636
Starting SUMO (sumo -c fast.sumo.cfg) on port 52636, seed 0
Connecting to SUMO (sumo -c fast.sumo.cfg) on port 52636 (try 1)
Releasing lock on port
Starting proxy mode
Done with proxy mode
Done with proxy mode, killing SUMO
Done running SUMO
Cleaning up
Result: "<?xml version="1.0"?>
<status>
        <exit-code>1</exit-code>
        <start>1585745706</start>
        <end>1585745717</end>
        <status>Exited with error code 1</status>
        <stdout><![CDATA[Loading configuration ... done.
Step #0.00 (1ms ~= 100.00*RT, ~6000.00UPS, TraCI: 1ms, vehicles TOT 6 ACT 6 BUF                                        Step #10.00 (1ms ~= 100.00*RT, ~30000.00UPS, TraCI: 0ms, vehicles TOT 30 ACT 30                                        Step #20.00 (0ms ?*RT. ?UPS, TraCI: 1ms, vehicles TOT 54 ACT 54 BUF 0)                                                 Step #30.00 (1ms ~= 100.00*RT, ~78000.00UPS, TraCI: 0ms, vehicles TOT 78 ACT 78                                        Step #40.00 (1ms ~= 100.00*RT, ~102000.00UPS, TraCI: 0ms, vehicles TOT 102 ACT 1                                       Step #50.00 (1ms ~= 100.00*RT, ~126000.00UPS, TraCI: 0ms, vehicles TOT 126 ACT 1                                       Step #60.00 (2ms ~= 50.00*RT, ~74500.00UPS, TraCI: 1ms, vehicles TOT 149 ACT 149                                       Step #70.00 (2ms ~= 50.00*RT, ~85000.00UPS, TraCI: 0ms, vehicles TOT 170 ACT 170                                       Step #80.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT 1                                       Step #90.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT 1                                       Step #100.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #110.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #120.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #130.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #140.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #150.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #160.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #170.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #180.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #190.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #200.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #210.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #220.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #230.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 1ms, vehicles TOT 174 ACT                                        Step #240.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #250.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 1ms, vehicles TOT 174 ACT                                        Step #260.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #270.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #280.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #290.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #300.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #310.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 1ms, vehicles TOT 174 ACT                                        Step #320.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #330.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #340.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #350.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #360.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 1ms, vehicles TOT 174 ACT                                        Step #370.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #380.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #390.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #400.00 (2ms ~= 50.00*RT, ~87000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT 17                                       Step #410.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #420.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #430.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #440.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 1ms, vehicles TOT 174 ACT                                        Step #450.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #460.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #470.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #480.00 (1ms ~= 100.00*RT, ~174000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT                                        Step #490.00 (2ms ~= 50.00*RT, ~87000.00UPS, TraCI: 0ms, vehicles TOT 174 ACT 17                                       Step #500.00]]></stdout>
        <stderr><![CDATA[Error: Requested command not implemented (0xb4): Comman                                       d not implemented in sumo
Error: tcpip::Socket::recvAndCheck @ recv: Software caused tcpip::Socket abort
Quitting (on error).
]]></stderr>
</status>
"
Closing connection from 127.0.0.1 on port 52635

And this one in the IDE console:

Simulation terminated with exit code: -2147483645
Working directory: C:/src/latest_simulte/simulations/Mode4
Command line: ../../../omnetpp-5.6.1/bin/opp_run.exe -m -u Qtenv -c General -n ..;../../src;../../../inet/src;../../../inet/examples;../../../inet/tutorials;../../../inet/showcases;../../../veins-veins-5.0/examples/veins;../../../veins-veins-5.0/src/veins;../../../veins-veins-5.0/subprojects/veins_inet3/src/veins_inet;../../../veins-veins-5.0/subprojects/veins_inet3/examples/veins_inet --image-path=../../images;../../../inet/images;../../../veins-veins-5.0/images;../../../veins-veins-5.0/subprojects/veins_inet3/images -l ../../src/lte -l ../../../inet/src/INET -l ../../../veins-veins-5.0/src/veins -l ../../../veins-veins-5.0/subprojects/veins_inet3/src/veins_inet omnetpp.ini

Environment variables:
PATH=;C:/src/latest_simulte/src;C:/src/inet/src;C:/src/veins-veins-5.0/src;C:/src/veins-veins-5.0/subprojects/veins_inet3/src;C:\src\omnetpp-5.6.1\bin;C:\src\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\src\omnetpp-5.6.1\tools\win64\usr\bin;;C:/src/omnetpp-5.6.1/ide/jre/bin/server;C:/src/omnetpp-5.6.1/ide/jre/bin;C:/src/omnetpp-5.6.1/ide/jre/lib/amd64;.;C:\src\omnetpp-5.6.1\bin;C:\src\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\src\omnetpp-5.6.1\tools\win64\usr\local\bin;C:\src\omnetpp-5.6.1\tools\win64\usr\bin;C:\src\omnetpp-5.6.1\tools\win64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\src\omnetpp-5.6.1\tools\win64\usr\bin\site_perl;C:\src\omnetpp-5.6.1\tools\win64\usr\bin\vendor_perl;C:\src\omnetpp-5.6.1\tools\win64\usr\bin\core_perl;C:\src\sumo-1.5.0\bin;C:\src\omnetpp-5.6.1;
OMNETPP_ROOT=C:/src/omnetpp-5.6.1/
OMNETPP_IMAGE_PATH=C:\src\omnetpp-5.6.1\images

If i try to run the configuration in General mode it asks me about the Highway.car[0].applType. Neither the default value "" nor the one defined in Base "Mode4App" work properly, it also crashes.

This error occurs when executing with Qtenv or Cmdenv, after some seconds of execution happened, here I am completly lost.

Thank you for your useful help.

brianmc95 commented 4 years ago

Hi @dalego1997

It looks as though this is an issue with your SUMO version or else the SUMO implementation on windows, currently I'm using version 1.4.0 and that works but on linux, I've used other earlier versions previously too and never had the above issue. OMNeT++ looks to be booting up correctly as well, see if you can run the road network simulations with sumo normally, just move into the directory and check if they run normally, if they do then it might be TRACI that's the problem.

If I'm totally honest with you I have to go back to my earlier comment, you will have a much easier time if you use linux you won't run into half as many issues.

dalego1997 commented 4 years ago

Hi @brianmc95 ,

I definetly will, I have to wait a couple of weeks because I need to buy some things but I will go to linux.

The fast.sumo.cfg works properly opening it in SUMO. The unique thing that it seems strange to me is this:

image

I says:

Warning: Unused entry (does not match any parameters)

[Config Base] / *.car[*].d2dCapable

Does not match any module parameters 

It may be this problem? That I am missing a module?

If this is not, I will go to SUMO 1.4 and if it stills crashes I will move to linux.

Thank you!

brianmc95 commented 4 years ago

Hi @dalego1997

That's fine, though in the interim maybe a VM might do the job for you (I know there are many drawbacks to this too but as a temporary solution it's something).

This I think is due to the fact that the OMNeT++ has issues importing the simuLTE vehicle ned files these are found in simulte/src/corenetwork/nodes/cars I believe if you check settings you should be able to add the nodes as project references or ned objects and this warning will go away, though the simulations should run normally in either case.

I don't think that is the cause of your issue though at the same time.

Try 1.4 and let me know how you get on.

You're welcome!

dalego1997 commented 4 years ago

Hi @brianmc95 ,

During a while it worked with SUMO 1.4, the execution passed the 500 seconds (where usually crashes) and it started its slow path until the end of the simulation (512 s, right?). Nevertheless after three tries where the console of the IDE (I was executing the simulation with Cmdenv) was stopped at some point (I remember being stoped at 17 or 20 min of elapsed time at the line that was printing very 2 sec of time elapsed) like the simulation was not going on, it stopped working again. I was going to try a 4th time to show you where it was stopped but suddenly stopped working again and crashing at the same point. Always after 500 sec (which I imagine is the simulation of the mobility of the cars before sending messages).

Here is a bit of extra information of where it crashes

Running simulation...
** Event #0   t=0   Elapsed: 1.7e-005s (0m 00s)  0% completed  (0% total)
     Speed:     ev/sec=0   simsec/sec=0   ev/simsec=0
     Messages:  created: 2   present: 2   in FES: 3
** Event #256   t=500.001   Elapsed: 9.71476s (0m 09s)  97% completed  (97% total)
     Speed:     ev/sec=26.4547   simsec/sec=51.4683   ev/simsec=0.513999
     Messages:  created: 1054   present: 876   in FES: 697

After this, the message I attached at my last answer is shown again. I have been investigating and the parameter 0xb4 it is used by SUMO to move a car to a given position XY in the network (https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html#move_to_xy_0xb4) because of a reason that I do not know at last second (Step #500) fails this command.

Definetly if it has gone around the 500 seconds with no problem at least three times should be a bug on my side or something strange.

I just wanted to update you, I will try to build everything again in a VM once I have enough time to do it.

Thank you so much!

brianmc95 commented 4 years ago

Hi @dalego1997

Sorry for the delay in responding. Yes by default the simulations go until 512s. I am surprised it would stop so far into the simulation the only reason you would suddenly stop making progress is if you somehow got into some sort of infinite loop but even in those cases the actual output of time would not come up so I believe it would still have been progressing. Though at the same time the simulations do take some time to complete unfortunately due to the nature of cv2x it's rather complex and as such time consuming.

As for why it would stop working after 3 successful attempts that's quite surprising, the only thing I could think of is somehow your system is placing a car illegally maybe but I've never seen this happen and the SUMO simulations aren't randomised so they should be the same each time. Unfortunately I think running this on windows is just too much of a headache to be worth it.

But thanks for letting me know about all this, I am going to close this issue for now but feel free to open a new one if you run into other issues.

You're welcome! Brian

dalego1997 commented 4 years ago

Hi Brian,

Thank you for de feedback and sorry for the delay. I have little time to check everything but I had a look at the overall picture.

I would like to be sure what is the final intention of the simulation. As far as I know is the Mode4App (application layer) the one that regulates what is the intention of the simulation. Correct me if I am wrong, the final intention is to send AlertPackets to all the cars in the simulation and once it is received by a car, to save the total delay? And then to check the records about the different delays?

If I want to do another simulation I have to create another application layer modulw with what I want, choose my own Scenario (if I do not want to take Highway for example) and change the omnetpp.ini parameters that I need/want, right?

Thank you very much, I hope you and your familiars are doing well.

Daniel León González

On Thu, Apr 2, 2020, 13:30 Brian McCarthy notifications@github.com wrote:

Hi @dalego1997 https://github.com/dalego1997

Sorry for the delay in responding. Yes by default the simulations go until 512s. I am surprised it would stop so far into the simulation the only reason you would suddenly stop making progress is if you somehow got into some sort of infinite loop but even in those cases the actual output of time would not come up so I believe it would still have been progressing. Though at the same time the simulations do take some time to complete unfortunately due to the nature of cv2x it's rather complex and as such time consuming.

As for why it would stop working after 3 successful attempts that's quite surprising, the only thing I could think of is somehow your system is placing a car illegally maybe but I've never seen this happen and the SUMO simulations aren't randomised so they should be the same each time. Unfortunately I think running this on windows is just too much of a headache to be worth it.

But thanks for letting me know about all this, I am going to close this issue for now but feel free to open a new one if you run into other issues.

You're welcome! Brian

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/brianmc95/OpenCV2X/issues/11#issuecomment-607788948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKATKCHYHF763CA2SNK3I3RKRZMJANCNFSM4LY2L6OQ .