From a7ec3f7a499c20b1165d60b3dbf2733bea864857 Mon Sep 17 00:00:00 2001 From: KafuuChikai <810658920qq@gmail.com> Date: Sat, 28 Dec 2024 22:56:59 +0800 Subject: [PATCH] fix AttributeError: 'HoverEnv' object has no attribute 'target' --- examples/drone/hover_env.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/drone/hover_env.py b/examples/drone/hover_env.py index 3d48d6b3..47d25d8c 100644 --- a/examples/drone/hover_env.py +++ b/examples/drone/hover_env.py @@ -64,6 +64,8 @@ def __init__(self, num_envs, env_cfg, obs_cfg, reward_cfg, command_cfg, show_vie ), ), ) + else: + self.target = None # add camera if self.env_cfg["visualize_camera"]: