From 5dbbf571d12d470235f424f74a341113ed6ec585 Mon Sep 17 00:00:00 2001 From: MagDish <2717360869@qq.com> Date: Sat, 16 Nov 2024 17:32:06 +0800 Subject: [PATCH] new_ walk_rel_orientation --- scripts/gyms/Sprint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gyms/Sprint.py b/scripts/gyms/Sprint.py index 13a396d..5bbecb4 100644 --- a/scripts/gyms/Sprint.py +++ b/scripts/gyms/Sprint.py @@ -235,7 +235,7 @@ class sprint(gym.Env): self.target = np.array([10, 0]) self.walk_rel_target = self.path_manager.get_path_to_target(target=self.target)[0] self.walk_distance = self.path_manager.get_path_to_target(target=self.target)[2] - self.walk_rel_orientation = self.path_manager.get_path_to_target(target=self.target)[1] - r.imu_torso_orientation + self.walk_rel_orientation = (self.path_manager.get_path_to_target(target=self.target)[1]) * 0.3 for _ in range(25): self.player.scom.unofficial_beam(self.Gen_player_pos, 0) # beam player continuously (floating above ground) @@ -302,7 +302,7 @@ class sprint(gym.Env): # self.walk_rel_orientation = M.vector_angle(self.walk_rel_target) * 0.5 self.walk_rel_target = self.path_manager.get_path_to_target(target=self.target)[0] self.walk_distance = self.path_manager.get_path_to_target(target=self.target)[2] - self.walk_rel_orientation = self.path_manager.get_path_to_target(target=self.target)[1] - r.imu_torso_orientation + self.walk_rel_orientation = (self.path_manager.get_path_to_target(target=self.target)[1] - r.imu_torso_orientation) * 0.3 # exponential moving average self.act = 0.8 * self.act + 0.2 * action * action_mult * 0.7