Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why is projected_gravity calculated from quat_rotate instead of quat_rotate_inverse? #168

Open
DeeDive opened this issue May 28, 2024 · 0 comments

Comments

@DeeDive
Copy link

DeeDive commented May 28, 2024

Hello authors,

I notice the code here, the base_lin_vel and base_ang_vel is calculated from quat_rotate_inverse; but the projected gravity is from quat_rotate;

base_ang_vel = quat_rotate_inverse(torso_rotation, ang_velocity) * self.ang_vel_scale projected_gravity = quat_rotate(torso_rotation, self.gravity_vec)

https://github.com/NVIDIA-Omniverse/OmniIsaacGymEnvs/blob/4948d18d042ec4f26625b67ce09afaa4b9dcbcc3/omniisaacgymenvs/tasks/anymal.py#L153-L154

While in similar implementations like legged_gym,

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)

https://github.com/leggedrobotics/legged_gym/blob/20f7f92e89865084b958895d988513108b307e6c/legged_gym/envs/base/legged_robot.py#L120

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant