From a9aa9d58a04a28e920d646d24d6e35c6dd263585 Mon Sep 17 00:00:00 2001 From: Jung Yeon Lee <40867411+curieuxjy@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:15:24 +0900 Subject: [PATCH] Fix quat_rotate function for projected_gravity Update legged_robot.py --- legged_gym/envs/base/legged_robot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legged_gym/envs/base/legged_robot.py b/legged_gym/envs/base/legged_robot.py index 90806a12..fc06b185 100644 --- a/legged_gym/envs/base/legged_robot.py +++ b/legged_gym/envs/base/legged_robot.py @@ -117,7 +117,7 @@ def post_physics_step(self): self.base_quat[:] = self.root_states[:, 3:7] self.base_lin_vel[:] = quat_rotate_inverse(self.base_quat, self.root_states[:, 7:10]) self.base_ang_vel[:] = quat_rotate_inverse(self.base_quat, self.root_states[:, 10:13]) - self.projected_gravity[:] = quat_rotate_inverse(self.base_quat, self.gravity_vec) + self.projected_gravity[:] = quat_rotate(self.base_quat, self.gravity_vec) self._post_physics_step_callback()