@@ -24,9 +24,9 @@ class ArmHighSpdFeedback:
24
24
25
25
位描述:
26
26
27
- Byte 0: 转速高八位, int16, 电机当前转速 单位: RPM
27
+ Byte 0: 转速高八位, int16, 电机当前转速 单位: 0.001rad/s
28
28
Byte 1: 转速低八位
29
- Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.1A
29
+ Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.001A
30
30
Byte 3: 电流低八位
31
31
Byte 4: 位置最高位, int32, 电机当前位置 单位: rad
32
32
Byte 5: 位置次高位
@@ -52,17 +52,17 @@ class ArmHighSpdFeedback:
52
52
53
53
Bit Description:
54
54
55
- Byte 0: Motor Speed (High Byte), int16, unit: RPM
55
+ Byte 0: Motor Speed (High Byte), int16, unit: 0.001rad/s
56
56
Byte 1: Motor Speed (Low Byte)
57
- Byte 2: Motor Current (High Byte), uint16, unit: 0.1 A
57
+ Byte 2: Motor Current (High Byte), uint16, unit: 0.001A
58
58
Byte 3: Motor Current (Low Byte)
59
59
Byte 4: Motor Position (Most Significant Byte), int32, unit: rad
60
60
Byte 5: Motor Position (Second Most Significant Byte)
61
61
Byte 6: Motor Position (Second Least Significant Byte)
62
62
Byte 7: Motor Position (Least Significant Byte)
63
63
'''
64
64
def __init__ (self ,
65
- can_id :Literal [0x000 , 0x251 , 0x252 , 0x253 , 0x254 , 0x254 , 0x255 , 0x256 ] = 0 ,
65
+ can_id : Literal [0x000 , 0x251 , 0x252 , 0x253 , 0x254 , 0x254 , 0x255 , 0x256 ] = 0 ,
66
66
motor_speed : int = 0 ,
67
67
current : int = 0 ,
68
68
pos : int = 0 ,
@@ -77,8 +77,8 @@ def __init__(self,
77
77
def __str__ (self ):
78
78
return (f"ArmHighSpdFeedback(\n "
79
79
f" can_id: { hex (self .can_id )} ,\n "
80
- f" motor_speed: { self .motor_speed } RPM ,\n "
81
- f" current: { self .current } , { self .current * 0.1 } A\n "
80
+ f" motor_speed: { self .motor_speed } , { self . current * 0.001 } rad/s ,\n "
81
+ f" current: { self .current } , { self .current * 0.001 } A\n "
82
82
f" pos: { self .pos } rad\n "
83
83
f")" )
84
84
0 commit comments