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

Cannot start donkeycar sim. Exception: Could not connect to server. #1183

Open
innovationty opened this issue Jun 7, 2024 · 0 comments
Open

Comments

@innovationty
Copy link

Here is the information for the exception. I tried to follow the video https://www.youtube.com/watch?v=wqQMmHVT8qw, but it didn't work.
How could I solve the problem? I really appreciate to get answers.

starting DonkeyGym env
Setting default: start_delay 5.0
Setting default: max_cte 8.0
Setting default: cam_resolution (120, 160, 3)
Setting default: log_level 20
Setting default: steer_limit 1.0
Setting default: throttle_min 0.0
Setting default: throttle_max 1.0
donkey subprocess started
INFO:gym_donkeycar.core.client:connecting to 127.0.0.1:9091
Traceback (most recent call last):
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/core/client.py", line 45, in connect
self.s.connect((self.host, self.port))
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/polo/mysim/manage.py", line 1142, in
drive(cfg, model_path=args['--model'], use_joystick=args['--js'],
File "/home/polo/mysim/manage.py", line 92, in drive
add_simulator(V, cfg)
File "/home/polo/mysim/manage.py", line 765, in add_simulator
gym = DonkeyGymEnv(cfg.DONKEY_SIM_PATH, host=cfg.SIM_HOST, env_name=cfg.DONKEY_GYM_ENV_NAME, conf=cfg.GYM_CONF,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/polo/miniconda3/envs/donkey/lib/python3.11/site-packages/donkeycar/parts/dgym.py", line 28, in init
self.env = gym.make(env_name, conf=conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/polo/miniconda3/envs/donkey/lib/python3.11/site-packages/gym/envs/registration.py", line 676, in make
return registry.make(id, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/polo/miniconda3/envs/donkey/lib/python3.11/site-packages/gym/envs/registration.py", line 520, in make
return spec.make(kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/polo/miniconda3/envs/donkey/lib/python3.11/site-packages/gym/envs/registration.py", line 140, in make
env = cls(
_kwargs)
^^^^^^^^^^^^^^
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/envs/donkey_env.py", line 179, in init
super().init(level="generated_track", *args, **kwargs)
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/envs/donkey_env.py", line 91, in init
self.viewer = DonkeyUnitySimContoller(conf=conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/envs/donkey_sim.py", line 71, in init
self.client = SimClient(self.address, self.handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/core/sim_client.py", line 28, in init
super().init(*address)
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/core/client.py", line 37, in init
self.connect()
File "/home/polo/projects/gym-donkeycar/gym_donkeycar/core/client.py", line 47, in connect
raise (
Exception: Could not connect to server. Is it running? If you specified 'remote', then you must start it manually.
closing donkey sim subprocess

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