Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] I am unable to start sumo from c++ by using libtraci

Good Morning

I hope this email finds you well. I am currently trying to start sumo from an unreal engine c++ program. importing libtraci library was successful. However , I cannot start sumo based on the sample in libtraci documentation. here is my code:


 
 std::string sumoPath = "C:\Users\simone\Downloads\sumo-1.19.0\bin\sumo-gui"; 

 std::vector<std::string> sumoArgs = { "-n", "C:\Users\simone\Downloads\sumo-1.19.0\bin\montreal1.net" };

libsumo::Simulation::start(sumoPath, sumoArgs);

 // Simulate for 5 steps
 for (int i = 0; i < 5; i++) {
    libsumo::Simulation::step();
 }

  libsumo::Simulation::close();



However, I think I am entering the argument wrong. What should be the argument of the start method?
start({"sumo", "-n", "net.net.xml"});


I appreciate your help and answer my question. Thank you so much.

Best regards,
Milad

Back to the top