linter pt3

This commit is contained in:
Martino Russi
2025-11-27 11:02:55 +01:00
parent bf0e7f4c63
commit 0213011fec
2 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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):