Skip to content

Commit fa9aa66

Browse files
committed
[NORMAL]修改piper_param_manager中的限幅,令限幅范围缩小一点防止撞击限位
1 parent bb3e1c4 commit fa9aa66

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

interface/piper_interface.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1998,12 +1998,12 @@ def JointCtrl(self,
19981998
19991999
|joint_name| limit(rad) | limit(angle) |
20002000
|----------| ---------- | ---------- |
2001-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2001+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
20022002
|joint2 | [0, 3.14] | [0, 180.0] |
20032003
|joint3 | [-2.967, 0] | [-170, 0] |
20042004
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
20052005
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2006-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2006+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
20072007
20082008
Args:
20092009
joint_1 (int): 关节1角度,单位0.001度
@@ -2021,12 +2021,12 @@ def JointCtrl(self,
20212021
20222022
|joint_name| limit(rad) | limit(angle) |
20232023
|----------| ---------- | ---------- |
2024-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2024+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
20252025
|joint2 | [0, 3.14] | [0, 180.0] |
20262026
|joint3 | [-2.967, 0] | [-170, 0] |
20272027
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
20282028
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2029-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2029+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
20302030
20312031
Args:
20322032
joint_1 (int): The angle of joint 1.in 0.001°
@@ -2424,12 +2424,12 @@ def MotorAngleLimitMaxSpdSet(self,
24242424
24252425
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
24262426
|----------| ---------- | ---------- | ---------- |
2427-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2427+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
24282428
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
24292429
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
24302430
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
24312431
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2432-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2432+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
24332433
'''
24342434
'''
24352435
Sets the motor angle limit/maximum speed limit command
@@ -2445,12 +2445,12 @@ def MotorAngleLimitMaxSpdSet(self,
24452445
24462446
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
24472447
|----------| ---------- | ---------- | ---------- |
2448-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2448+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
24492449
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
24502450
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
24512451
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
24522452
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2453-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2453+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
24542454
'''
24552455
tx_can = Message()
24562456
motor_set = ArmMsgMotorAngleLimitMaxSpdSet(motor_num, max_angle_limit, min_angle_limit, max_joint_spd)

interface/piper_interface_v1.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1998,12 +1998,12 @@ def JointCtrl(self,
19981998
19991999
|joint_name| limit(rad) | limit(angle) |
20002000
|----------| ---------- | ---------- |
2001-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2001+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
20022002
|joint2 | [0, 3.14] | [0, 180.0] |
20032003
|joint3 | [-2.967, 0] | [-170, 0] |
20042004
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
20052005
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2006-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2006+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
20072007
20082008
Args:
20092009
joint_1 (int): 关节1角度,单位0.001度
@@ -2021,12 +2021,12 @@ def JointCtrl(self,
20212021
20222022
|joint_name| limit(rad) | limit(angle) |
20232023
|----------| ---------- | ---------- |
2024-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2024+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
20252025
|joint2 | [0, 3.14] | [0, 180.0] |
20262026
|joint3 | [-2.967, 0] | [-170, 0] |
20272027
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
20282028
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2029-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2029+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
20302030
20312031
Args:
20322032
joint_1 (int): The angle of joint 1.in 0.001°
@@ -2424,12 +2424,12 @@ def MotorAngleLimitMaxSpdSet(self,
24242424
24252425
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
24262426
|----------| ---------- | ---------- | ---------- |
2427-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2427+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
24282428
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
24292429
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
24302430
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
24312431
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2432-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2432+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
24332433
'''
24342434
'''
24352435
Sets the motor angle limit/maximum speed limit command
@@ -2445,12 +2445,12 @@ def MotorAngleLimitMaxSpdSet(self,
24452445
24462446
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
24472447
|----------| ---------- | ---------- | ---------- |
2448-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2448+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
24492449
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
24502450
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
24512451
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
24522452
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2453-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2453+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
24542454
'''
24552455
tx_can = Message()
24562456
motor_set = ArmMsgMotorAngleLimitMaxSpdSet(motor_num, max_angle_limit, min_angle_limit, max_joint_spd)

interface/piper_interface_v2.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -2104,12 +2104,12 @@ def JointCtrl(self,
21042104
21052105
|joint_name| limit(rad) | limit(angle) |
21062106
|----------| ---------- | ---------- |
2107-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2107+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
21082108
|joint2 | [0, 3.14] | [0, 180.0] |
21092109
|joint3 | [-2.967, 0] | [-170, 0] |
21102110
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
21112111
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2112-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2112+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
21132113
21142114
Args:
21152115
joint_1 (int): 关节1角度,单位0.001度
@@ -2127,12 +2127,12 @@ def JointCtrl(self,
21272127
21282128
|joint_name| limit(rad) | limit(angle) |
21292129
|----------| ---------- | ---------- |
2130-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
2130+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
21312131
|joint2 | [0, 3.14] | [0, 180.0] |
21322132
|joint3 | [-2.967, 0] | [-170, 0] |
21332133
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
21342134
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
2135-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
2135+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
21362136
21372137
Args:
21382138
joint_1 (int): The angle of joint 1.in 0.001°
@@ -2530,12 +2530,12 @@ def MotorAngleLimitMaxSpdSet(self,
25302530
25312531
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
25322532
|----------| ---------- | ---------- | ---------- |
2533-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2533+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
25342534
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
25352535
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
25362536
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
25372537
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2538-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2538+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
25392539
'''
25402540
'''
25412541
Sets the motor angle limit/maximum speed limit command
@@ -2551,12 +2551,12 @@ def MotorAngleLimitMaxSpdSet(self,
25512551
25522552
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
25532553
|----------| ---------- | ---------- | ---------- |
2554-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
2554+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
25552555
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
25562556
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
25572557
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
25582558
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
2559-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
2559+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
25602560
'''
25612561
tx_can = Message()
25622562
motor_set = ArmMsgMotorAngleLimitMaxSpdSet(motor_num, max_angle_limit, min_angle_limit, max_joint_spd)

piper_msgs/msg_v1/transmit/arm_motor_angle_limit_max_spd_config.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class ArmMsgMotorAngleLimitMaxSpdSet:
2020
2121
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
2222
|----------| ---------- | ---------- | ---------- |
23-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
23+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
2424
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
2525
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
2626
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
2727
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
28-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
28+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
2929
3030
位描述:
3131
@@ -53,12 +53,12 @@ class ArmMsgMotorAngleLimitMaxSpdSet:
5353
5454
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
5555
|----------| ---------- | ---------- | ---------- |
56-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
56+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
5757
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
5858
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
5959
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
6060
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
61-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
61+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
6262
6363
Bit Description:
6464

piper_msgs/msg_v2/transmit/arm_motor_angle_limit_max_spd_config.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class ArmMsgMotorAngleLimitMaxSpdSet:
2020
2121
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
2222
|----------| ---------- | ---------- | ---------- |
23-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
23+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
2424
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
2525
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
2626
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
2727
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
28-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
28+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
2929
3030
位描述:
3131
@@ -53,12 +53,12 @@ class ArmMsgMotorAngleLimitMaxSpdSet:
5353
5454
|joint_name| limit(rad) | limit(angle) | limit(rad/s) |
5555
|----------| ---------- | ---------- | ---------- |
56-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] | [0, 3.0] |
56+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] | [0, 3.0] |
5757
|joint2 | [0, 3.14] | [0, 180.0] | [0, 3.0] |
5858
|joint3 | [-2.967, 0] | [-170, 0] | [0, 3.0] |
5959
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] | [0, 3.0] |
6060
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] | [0, 3.0] |
61-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] | [0, 3.0] |
61+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] | [0, 3.0] |
6262
6363
Bit Description:
6464

piper_param/piper_param_manager.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ def __init__(self) -> None:
1616
'''
1717
|joint_name| limit(rad) | limit(angle) |
1818
|----------| ---------- | ---------- |
19-
|joint1 | [-2.618, 2.618] | [-150.0, 150.0] |
19+
|joint1 | [-2.6179, 2.6179] | [-150.0, 150.0] |
2020
|joint2 | [0, 3.14] | [0, 180.0] |
2121
|joint3 | [-2.967, 0] | [-170, 0] |
2222
|joint4 | [-1.745, 1.745] | [-100.0, 100.0] |
2323
|joint5 | [-1.22, 1.22] | [-70.0, 70.0] |
24-
|joint6 | [-2.0944, 2.0944]| [-120.0, 120.0] |
24+
|joint6 | [-2.09439, 2.09439]| [-120.0, 120.0] |
2525
'''
2626
if not hasattr(self, "PIPER_PARAM"):
2727
self.__PIPER_PARAM_ORIGIN = {
2828
"joint_limit":{
29-
"j1": [-2.618, 2.618],
29+
"j1": [-2.6179, 2.6179],
3030
"j2": [0, 3.14],
3131
"j3": [-2.967, 0],
3232
"j4": [-1.745, 1.745],
3333
"j5": [-1.22, 1.22],
34-
"j6": [-2.0944, 2.0944],
34+
"j6": [-2.09439, 2.09439],
3535
},
3636
"gripper_range": [0.0, 0.07],
3737
"piper_sdk_version": PiperSDKVersion.PIPER_SDK_CURRENT_VERSION

0 commit comments

Comments
 (0)