praveen-palanisamy / macad-gym

Multi-Agent Connected Autonomous Driving (MACAD) Gym environments for Deep RL. Code for the paper presented in the Machine Learning for Autonomous Driving Workshop at NeurIPS 2019:
https://arxiv.org/abs/1911.04175
MIT License
334 stars 74 forks source link

v0.1.3 carla serve can't get connection #87

Closed Kinvy66 closed 10 months ago

Kinvy66 commented 10 months ago

macad-gym-v0.1.3 Running the supplied example basic_agent.py gives an error when the carla client connects to the server, and then keeps dead-ending in the following code:

self._client = None
        while self._client is None:
            try:
                self._client = carla.Client("localhost", self._server_port)
                # The socket establishment could takes some time
                time.sleep(2)
                self._client.set_timeout(2.0)
                print(
                    "Client successfully connected to server, Carla-Server version: ",
                    self._client.get_server_version(),
                )
            except RuntimeError as re:
                if "timeout" not in str(re) and "time-out" not in str(re):
                    print("Could not connect to Carla server because:", re)
                self._client = None

My Running Environment:

praveen-palanisamy commented 10 months ago

Hi @Kinvy66 , Thank you for describing the problem you are facing with v0.1.3. I did not observe this behavior with the v0.1.3 before that commit was tagged for a release. Since you have no problem running the example with the latest code on the main branch, perhaps you could pull/update the code and your venv or try with v0.1.5? It is better to use the latest version. Please report if you run any issues with the latest version.