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

The issue encountered with manual control using the steering wheel is as follows: #713

Open
piner-xu opened this issue May 7, 2024 · 1 comment

Comments

@piner-xu
Copy link

piner-xu commented May 7, 2024

In manual control, both controller="keyboard" and controller="joystick" work fine. However, controller="steering_wheel" and controller="xbos" encounter issues.

The version number I am using is 0.3.0.1.

The encountered issues are as follows:

Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
Traceback (most recent call last):
File "E:/metadrive/metadrive-MetaDrive-0.3.0.1/metadrive/examples/drive_in_single_agent_env.py", line 59, in
raise e
File "E:/metadrive/metadrive-MetaDrive-0.3.0.1/metadrive/examples/drive_in_single_agent_env.py", line 39, in
o = env.reset()
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\envs\base_env.py", line 380, in reset
self.engine.reset()
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\engine\base_engine.py", line 259, in reset
manager.reset()
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\manager\agent_manager.py", line 114, in reset
config_dict=self.engine.global_config["target_vehicle_configs"]
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\manager\agent_manager.py", line 70, in _get_vehicles
self.add_policy(obj.id, policy_cls, obj, self.generate_seed())
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\manager\base_manager.py", line 94, in add_policy
return self.engine.add_policy(object_id, policy_class, *policy_args, **policy_kwargs)
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\engine\base_engine.py", line 72, in add_policy
policy = policy_class(*args, **kwargs)
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\policy\manual_control_policy.py", line 38, in init
raise ValueError("No such a controller type: {}".format(self.config["controller"]))
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\utils\config.py", line 205, in getitem
self._check_and_raise_key_error(item)
File "E:\metadrive\metadrive-MetaDrive-0.3.0.1\metadrive\utils\config.py", line 194, in _check_and_raise_key_error
key, self._config.keys()
KeyError: "'controller' does not exist in existing config. Please use config.update(...) to update the config. Existing keys: dict_keys([])."

Process finished with exit code 1

@QuanyiLi
Copy link
Member

QuanyiLi commented Jun 9, 2024

Could you use the latest MetaDrive? It is hard for us to debug and add any fix to an out-of-date release

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

2 participants