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

TCP connection error in ch 7 #42

Open
Zehnaseeb opened this issue Jul 10, 2023 · 3 comments
Open

TCP connection error in ch 7 #42

Zehnaseeb opened this issue Jul 10, 2023 · 3 comments

Comments

@Zehnaseeb
Copy link

CARLA version: 0.9.13
Platform/OS: Linux 20.04
Problem you have experienced: TCP Connection error : Port closed -> Carla server is crashing.
What you expected to happen: Rendering carla simulator.
Steps to reproduce: python3 carla-gym/carla_gym/envs/carla_env.py

This the error I am getting while trying to run carla_env.py:


learing Carla server state
Traceback (most recent call last):
  File "carla_env.py", line 554, in <module>
    obs = env.reset()
  File "carla_env.py", line 231, in reset
    raise error
  File "carla_env.py", line 226, in reset
    return self.reset_env()
  File "carla_env.py", line 274, in reset_env
    scene = self.client.load_settings(settings)
  File "/home/ubuntu/carla-gym/carla_gym/envs/carla/client.py", line 75, in load_settings
    return self._request_new_episode(carla_settings)
  File "/home/ubuntu/carla-gym/carla_gym/envs/carla/client.py", line 160, in _request_new_episode
    data = self._world_client.read()
  File "/home/ubuntu/carla-gym/carla_gym/envs/carla/tcp.py", line 73, in read
    header = self._read_n(4)
  File "/home/ubuntu/carla-gym/carla_gym/envs/carla/tcp.py", line 91, in _read_n
    raise TCPConnectionError(self._logprefix + 'connection closed')
carla.tcp.TCPConnectionError: (localhost:44405) connection closed
Killing live carla processes set()
Clearing Carla server state
@rajat-packt
Copy link

Hey @praveen-palanisamy, would you be able to help our reader figure out what is going wrong here?

@praveen-palanisamy
Copy link
Collaborator

Hi @Zehnaseeb ,
Looks like your CARLA Server is not running or has crashed before the Carla-Gym environment could be created using the ch7/carla-gym/carla_gym/envs/carla_env.py script.

Please try the following to resolve your issue:

  1. Ensure that you have started the CARLA Server binary before running the above script.
  2. If you did start the CARLA Server and you still run into the above issue, please check the console log produced by the CARLA Server binary to identify the reason it crashed.
  3. You may be able to resolve the issue that caused the CARLA server to crash on your system. If not, please post that log along with the CARLA server (0.9.13?) and client versions that you are using.

@rajat-packt
Copy link

Hey @Zehnaseeb,
Could you let us know whether we can close this issue if it has been resolved after following Praveen Palanisamy's solution and steps?

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

No branches or pull requests

3 participants