isaac-sim / OmniIsaacGymEnvs

Reinforcement Learning Environments for Omniverse Isaac Gym
Other
836 stars 211 forks source link

What frame is base_ang_vel in? #82

Open joehays opened 12 months ago

joehays commented 12 months ago

The following is pulled from anymal_terrain.py

        base_lin_vel = quat_rotate_inverse(torso_rotation, velocity) * self.lin_vel_scale
        base_ang_vel = quat_rotate_inverse(torso_rotation, ang_velocity) * self.ang_vel_scale
        projected_gravity = quat_rotate(torso_rotation, self.gravity_vec)
        dof_pos_scaled = (dof_pos - self.default_dof_pos) * self.dof_pos_scale

we know that the base_quat is defined in the world frame.

I cannot find the definition of quat_rotate_inverse and there are no comments in anymal_terrain.py as to what's going on here.

Can anyone: 1) tell me how to find docs on quat_rotate_inverse? It's not in the omni.isaac.core docs 2) tell me what the authors of OmniIsaacGymEnvs are doing in anymal_terrain.py? The comment # prepare quantities is oh so helpful...

Ultimately, I want to know what frame base_ang_vel is in.

Help?

larsrpe commented 11 months ago

My understanding is the following:

  1. torso_rotation is the transform from body fixed frame to world frame. Hence quat_rotate_inverse applies the inverse transform from world frame to body fixed frame.

So base_lin_vel will be in the body fixed frame.