heleidsn / UAV_Navigation_DRL_AirSim

This is a new repo used for training UAV navigation (local path planning) policy using DRL methods.
212 stars 29 forks source link

No registered env with id 错误 #19

Open tk1363704 opened 1 year ago

tk1363704 commented 1 year ago

你好,我运行了AirSimNH.exe/SimpleAvoid.exe,之后再运行start_train_with_plot.py,但是在这两个环境下,都报错“No registered env with id”,请问如何解决这个问题? 报错具体如下: (airuav) E:\UAV_Navigation_DRL_AirSim>python start_train_with_plot.py init training thread Traceback (most recent call last): File "E:\anaconda3\envs\airuav\lib\site-packages\gym\envs\registration.py", line 150, in spec return self.env_specs[id] KeyError: 'airsim-env-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "E:\UAV_Navigation_DRL_AirSim\start_train_with_plot.py", line 56, in main() File "E:\UAV_Navigation_DRL_AirSim\start_train_with_plot.py", line 34, in main training_thread = TrainingThread(config_file) File "E:\UAV_Navigation_DRL_AirSim\utils\thread_train_fixedwing.py", line 50, in init self.env = gym.make('airsim-env-v0') File "E:\anaconda3\envs\airuav\lib\site-packages\gym\envs\registration.py", line 184, in make return registry.make(id, **kwargs) File "E:\anaconda3\envs\airuav\lib\site-packages\gym\envs\registration.py", line 105, in make spec = self.spec(path) File "E:\anaconda3\envs\airuav\lib\site-packages\gym\envs\registration.py", line 167, in spec raise error.UnregisteredEnv("No registered env with id: {}".format(id)) gym.error.UnregisteredEnv: No registered env with id: airsim-env-v0

zyian0505 commented 1 year ago

删除了不该删除的灰色import,你不动导入模块的代码会正常运行