mirror of
https://github.com/huggingface/lerobot.git
synced 2026-06-04 21:01:26 +00:00
linter pt3
This commit is contained in:
@@ -257,8 +257,8 @@ class UnitreeG1(Robot):
|
||||
self, waist_yaw, waist_yaw_omega, imu_quat, imu_omega
|
||||
): # transform imu data from torso to pelvis frame
|
||||
"""Transform IMU data from torso to pelvis frame."""
|
||||
rot_zWaist = R.from_euler("z", waist_yaw).as_matrix()
|
||||
rot_z_waist = R.from_euler("z", waist_yaw).as_matrix()
|
||||
rot_torso = R.from_quat([imu_quat[1], imu_quat[2], imu_quat[3], imu_quat[0]]).as_matrix()
|
||||
rot_pelvis = np.dot(rot_torso, rot_zWaist.T)
|
||||
w = np.dot(rot_zWaist, imu_omega[0]) - np.array([0, 0, waist_yaw_omega])
|
||||
rot_pelvis = np.dot(rot_torso, rot_z_waist.T)
|
||||
w = np.dot(rot_z_waist, imu_omega[0]) - np.array([0, 0, waist_yaw_omega])
|
||||
return R.from_matrix(rot_pelvis).as_quat()[[3, 0, 1, 2]], w
|
||||
|
||||
@@ -12,7 +12,7 @@ LOWCMD_PORT = 6000
|
||||
LOWSTATE_PORT = 6001
|
||||
|
||||
|
||||
def ChannelFactoryInitialize(*args, **kwargs): # DDS to socket bridge
|
||||
def ChannelFactoryInitialize(*args, **kwargs): # DDS to socket bridge #noqa : N802
|
||||
global _ctx, _lowcmd_sock, _lowstate_sock
|
||||
# read socket config
|
||||
config = UnitreeG1Config()
|
||||
@@ -37,7 +37,7 @@ class ChannelPublisher: # send action to robot
|
||||
self.topic = topic
|
||||
self.msg_type = msg_type
|
||||
|
||||
def Init(self):
|
||||
def Init(self): #noqa : N802
|
||||
pass
|
||||
|
||||
def Write(self, msg):
|
||||
@@ -49,7 +49,7 @@ class ChannelSubscriber: # read observation from robot
|
||||
self.topic = topic
|
||||
self.msg_type = msg_type
|
||||
|
||||
def Init(self):
|
||||
def Init(self): #noqa : N802
|
||||
pass
|
||||
|
||||
def Read(self):
|
||||
|
||||
Reference in New Issue
Block a user