riebl / artery

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

Creating an executable instead of using build #346

Open Rom-1T opened 1 month ago

Rom-1T commented 1 month ago

Hello,

I am using Reinforcement Learning with Artery and wanted to integrate veins-gym. Based on the example provided here, I want to build an executable using opp_makemake and make, which I can be used in conjunction with a Python script via veins-gym.

I have managed to integrate the connection between Artery and veins-gym, allowing me to run a simulation with an OpenAI agent (with cmake --build build --target run_my_reinforcement_scenario). However, to automate the learning phase, I want to try to create an executable just like Omnet++ vanilla does.

Is there a way to build the executable without directly running the simulation when using CMake? I haven't found a solution yet. Am I missing something in the process, or is there an alternative approach to achieve this?

Thank you for your help!

Here is the result with (with cmake --build build --target run_my_reinforcement_scenario) :

rl

riebl commented 1 month ago

Hi @Rom-1T,

From what I have seen, I think you don't strictly need a standalone Artery executable, but the command line arguments needed to start your particular scenario. At least I have found no reason why an "artery" executable would be superior to the existing "opp_run". We have already created a kind of wrapper script named "run_artery.sh" in the build directory, which allows you to start up an Artery simulation without using CMake run_X targets. Maybe that is already suitable for your use case? If it's not quite there, we may be able to extend it for your use case?