Skip to content

Commit 3381681

Browse files
committed
修改arm_high_spd_feedback里的motor_speed单位为0.001rad/s,current单位为0.001A
1 parent 7ca2105 commit 3381681

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

piper_msgs/msg_v1/feedback/arm_high_spd_feedback.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class ArmHighSpdFeedback:
2424
2525
位描述:
2626
27-
Byte 0: 转速高八位, int16, 电机当前转速 单位: RPM
27+
Byte 0: 转速高八位, int16, 电机当前转速 单位: 0.001rad/s
2828
Byte 1: 转速低八位
29-
Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.1A
29+
Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.001A
3030
Byte 3: 电流低八位
3131
Byte 4: 位置最高位, int32, 电机当前位置 单位: rad
3232
Byte 5: 位置次高位
@@ -52,9 +52,9 @@ class ArmHighSpdFeedback:
5252
5353
Bit Description:
5454
55-
Byte 0: Motor Speed (High Byte), int16, unit: RPM
55+
Byte 0: Motor Speed (High Byte), int16, unit: 0.001rad/s
5656
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
5858
Byte 3: Motor Current (Low Byte)
5959
Byte 4: Motor Position (Most Significant Byte), int32, unit: rad
6060
Byte 5: Motor Position (Second Most Significant Byte)
@@ -77,8 +77,8 @@ def __init__(self,
7777
def __str__(self):
7878
return (f"ArmHighSpdFeedback(\n"
7979
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"
8282
f" pos: {self.pos} rad\n"
8383
f")")
8484

piper_msgs/msg_v2/feedback/arm_high_spd_feedback.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class ArmHighSpdFeedback:
2424
2525
位描述:
2626
27-
Byte 0: 转速高八位, int16, 电机当前转速 单位: RPM
27+
Byte 0: 转速高八位, int16, 电机当前转速 单位: 0.001rad/s
2828
Byte 1: 转速低八位
29-
Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.1A
29+
Byte 2: 电流高八位, uint16, 电机当前电流 单位: 0.001A
3030
Byte 3: 电流低八位
3131
Byte 4: 位置最高位, int32, 电机当前位置 单位: rad
3232
Byte 5: 位置次高位
@@ -52,17 +52,17 @@ class ArmHighSpdFeedback:
5252
5353
Bit Description:
5454
55-
Byte 0: Motor Speed (High Byte), int16, unit: RPM
55+
Byte 0: Motor Speed (High Byte), int16, unit: 0.001rad/s
5656
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
5858
Byte 3: Motor Current (Low Byte)
5959
Byte 4: Motor Position (Most Significant Byte), int32, unit: rad
6060
Byte 5: Motor Position (Second Most Significant Byte)
6161
Byte 6: Motor Position (Second Least Significant Byte)
6262
Byte 7: Motor Position (Least Significant Byte)
6363
'''
6464
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,
6666
motor_speed: int = 0,
6767
current: int = 0,
6868
pos: int = 0,
@@ -77,8 +77,8 @@ def __init__(self,
7777
def __str__(self):
7878
return (f"ArmHighSpdFeedback(\n"
7979
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"
8282
f" pos: {self.pos} rad\n"
8383
f")")
8484

0 commit comments

Comments
 (0)