Hi everyone,
I want render the env after loading it from the tutorial 3. However, I get the error :
“AttributeError: ‘MPDrawParams’ object has no attribute ‘update’”.
I have the latest version of CommonRoad_RL.
What could be the problem?
Here is the full error
AttributeError Traceback (most recent call last)
<ipython-input-16-3bda7b2d99d9> in <module>
1 observation = training_env.reset()
2 for _ in range(50):
----> 3 training_env.render() # rendered images with be saved under ./img
4 action, _states = model_continual.predict(observation, deterministic=True)
5 observation, reward, done, info = training_env.step(action)
~/miniconda3/envs/commonroad2023/lib/python3.7/site-packages/stable_baselines/common/vec_env/base_vec_env.py in render(self, mode)
245
246 def render(self, mode: str = 'human'):
--> 247 return self.venv.render(mode=mode)
248
249 def get_images(self):
~/miniconda3/envs/commonroad2023/lib/python3.7/site-packages/stable_baselines/common/vec_env/dummy_vec_env.py in render(self, mode)
83 """
84 if self.num_envs == 1:
---> 85 return self.envs[0].render(mode=mode)
86 else:
87 return super().render(mode=mode)
~/miniconda3/envs/commonroad2023/lib/python3.7/site-packages/gym/core.py in render(self, mode, **kwargs)
293
294 def render(self, mode="human", **kwargs):
--> 295 return self.env.render(mode, **kwargs)
296
297 def close(self):
~/miniconda3/envs/commonroad2023/lib/python3.7/site-packages/gym/core.py in render(self, mode, **kwargs)
293
294 def render(self, mode="human", **kwargs):
--> 295 return self.env.render(mode, **kwargs)
296
297 def close(self):
~/miniconda3/envs/commonroad2023/lib/python3.7/site-packages/commonroad_rl/gym_commonroad/commonroad_env.py in render(self, mode, **kwargs)
326
327 # update timestep in draw_params
--> 328 self.draw_params.update({"scenario": {"time_begin": self.current_step, "time_end": self.current_step}})
329
330 # Draw scenario, goal, sensing range and detected obstacles
AttributeError: 'MPDrawParams' object has no attribute 'update'