Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving datas from SUMO simulation started with flow using TraCI from another terminal #1069

Open
LorenzoUccello opened this issue Sep 26, 2022 · 0 comments

Comments

@LorenzoUccello
Copy link

I am using Flow to start a SUMO simulation integrating deep reinforcement learning inside the process. I am also using another computer to retrieve some data from the simulation using TraCI.

The first problem is that flow does not assign the port I choose correctly. Secondly, the other computer connects to the SUMO simulation using TraCI, but as soon as it starts it goes out and doesn't save anything. The simulation keeps going on on the other computer.

• THIS IS THE CODE I USE ON THE FIRST COMPUTER TO ASSIGN THE PORT AND THE CLIENTS FOR SUMO

sim_params = SumoParams(port=45678, render=VISUALIZE_SIM_IN_SUMO, sim_step=1, num_clients=2)

• THIS IS THE CODE I USE ON THE SECOND COMPUTER TO CONNECT WITH TRACI AND RETRIEVE DATA

PORT = 49745 ( I need to set it once I start the simulation on the first computer since Flow does not use the port I specified at the beginning)

traci.init(PORT,tc.DEFAULT_NUM_RETRIES,"second_computer.local")
traci.setOrder(2) # number can be anything as long as each client gets its number

If this solution is not achievable, do you know how to get this data from another terminal ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant