MCPcopy Create free account
hub / github.com/InternRobotics/OpenHomie / get_gravity_orientation

Function get_gravity_orientation

MujocoDeploy/mujoco_deploy_g1.py:54–57  ·  view source on GitHub ↗

Get gravity vector in body frame

(quat)

Source from the content-addressed store, hash-verified

52 ])
53
54def get_gravity_orientation(quat):
55 """Get gravity vector in body frame"""
56 gravity_vec = np.array([0.0, 0.0, -1.0])
57 return quat_rotate_inverse(quat, gravity_vec)
58
59def compute_observation(d, config, action, cmd, height_cmd, n_joints):
60 """Compute the observation vector from current state"""

Callers 1

compute_observationFunction · 0.85

Calls 1

quat_rotate_inverseFunction · 0.85

Tested by

no test coverage detected