brianmc95 / OpenCV2X

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

Running error #18

Closed anjackq closed 3 years ago

anjackq commented 3 years ago

Hi there,

I've successfully installed the Artery-based OpenCV2X project as instructed. However, when I would like to run the examples, it gives me the followings error: typing this command:

make run_simulte-cars

and get:

[ 15%] Built target traci
[ 17%] Building SimuLTE (external dependency)
[ 17%] Built target build_simulte
[ 17%] Building INET (external dependency)
*** COMPILING with:
clang++ -c -std=c++11 -O3 -DNDEBUG=1 -MMD -MP -MF .d  -fPIC  -Wno-deprecated-register -Wno-unused-function -fno-omit-frame-pointer -DHAVE_SWAPCONTEXT -DWITH_MPI -DXMLPARSER=libxml -DPREFER_QTENV -DWITH_QTENV -DWITH_PARSIM -DWITH_NETBUILDER -Wno-overloaded-virtual -include inet/common/precompiled_release.h  -DINET_EXPORT -I. -I/home/anjie/Desktop/omnetpp-5.6.2/include
*** LINKING with:
clang++ -shared -fPIC -o ../out/clang-release/src/libINET.so -Wl,--no-as-needed -Wl,--whole-archive  -Wl,--no-whole-archive -loppenvir -loppsim -ldl -lstdc++  -Wl,-rpath,/home/anjie/Desktop/omnetpp-5.6.2/lib -Wl,-rpath,/lib -Wl,-rpath,.  -Wl,--export-dynamic -L/home/anjie/Desktop/omnetpp-5.6.2/lib
Building...
[ 17%] Built target build_inet
[ 17%] Building Veins (external dependency)
[ 17%] Built target build_veins
[ 18%] Building Vanetza (external dependency)
-- Cohda SDK not found (missing: COHDA_ROOT) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/anjie/Desktop/OpenCV2X/extern/vanetza/build
[  0%] Built target access
[ 63%] Built target asn1
[ 66%] Built target common
[ 69%] Built target net
[ 80%] Built target security
[ 85%] Built target dcc
[ 96%] Built target geonet
[ 97%] Built target btp
[ 98%] Built target facilities
[ 99%] Built target gnss
[100%] Built target proxy_fake_feed
[ 18%] Built target build_vanetza
[ 68%] Built target core
[ 79%] Built target envmod
[ 85%] Built target police
[100%] Built target storyboard
OMNeT++ Discrete Event Simulation  (C) 1992-2019 Andras Varga, OpenSim Ltd.
Version: 5.6.2, build: 200518-aa79d0918f, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer

Setting up Cmdenv...

Loading NED files from /home/anjie/Desktop/OpenCV2X/src/artery:  81
Loading NED files from /home/anjie/Desktop/OpenCV2X/src/traci:  16
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/veins/examples/veins:  1
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/veins/src/veins:  38
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/inet/src:  666
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/inet/examples:  174
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/inet/tutorials:  19
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/inet/showcases:  33
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/simulte/simulations:  13
Loading NED files from /home/anjie/Desktop/OpenCV2X/extern/simulte/src:  47

[Warning: Program was compiled without debug info, you might not be able to debug.]

RUNTIME ERROR. A cRuntimeError exception is about to be thrown, and you
requested (by setting debug-on-errors=true in the ini file) that errors
abort execution and break into the debugger.

You should now probably be running the simulation under gdb or another
debugger. The simulation kernel will now raise a SIGINT signal which will
get you into the debugger. If you are not running under a debugger, you can
still use the core dump for post-mortem debugging. Once in the debugger,
view the call stack (in gdb: "bt" command) to see the context of the
runtime error.

<!> No such config: Base

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready?
Trace/breakpoint trap (core dumped)
make[3]: *** [scenarios/CMakeFiles/run_simulte-cars.dir/build.make:57: scenarios/CMakeFiles/run_simulte-cars] Error 133
make[2]: *** [CMakeFiles/Makefile2:712: scenarios/CMakeFiles/run_simulte-cars.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:719: scenarios/CMakeFiles/run_simulte-cars.dir/rule] Error 2
make: *** [Makefile:298: run_simulte-cars] Error 2

please help

brianmc95 commented 3 years ago

Hi @anjackq

So this is an issue with the omnetpp.ini file I haven't included a base config in this (in a subsequent release I will make sure to do so though). If you want to change the configuration you want to run though you have 2 options the first is to update the config that opencv2x will attempt to run. To do this you need to go into your cmake build folder and using ccmake you can update the variable SCENARIO_CONFIG to whichever simulation you would like to run so possibly highwayFast .The second is to simply add a new config in scenarios/cars/omnetpp.ini under the name Base and copy one of the existing ones.

I hope this gets you up and running but reach out again if not.

Kind Regards, Brian

anjackq commented 3 years ago

Hi @anjackq

So this is an issue with the omnetpp.ini file I haven't included a base config in this (in a subsequent release I will make sure to do so though). If you want to change the configuration you want to run though you have 2 options the first is to update the config that opencv2x will attempt to run. To do this you need to go into your cmake build folder and using ccmake you can update the variable SCENARIO_CONFIG to whichever simulation you would like to run so possibly highwayFast .The second is to simply add a new config in scenarios/cars/omnetpp.ini under the name Base and copy one of the existing ones.

I hope this gets you up and running but reach out again if not.

Kind Regards, Brian

Hi Brian,

it works now. However, is there any option to run the simulation with the GUI of the omnet++ simulator? Just like the Artery, so that one can choose configs inside the simulator freely.

BR, Anjie

brianmc95 commented 3 years ago

Hi @anjackq,

No worries glad it's working for you, if you want to run it with the GUI you should be able to do this also if you use the same process i.e. go into the build directory and using ccmake you can update the OMNETPP_RUN_ENV to either QTenv or TKenv and that should launch the GUI when you run the experiments.

Let me know if you run into issues though.

Kind Regards, Brian