Skip to content

Commit 8f420be

Browse files
authored
support setting max_velocity and max_acceleration for arms (#376)
1 parent 0c0d399 commit 8f420be

File tree

14 files changed

+198
-31
lines changed

14 files changed

+198
-31
lines changed

pyrep/robots/arms/baxter.py

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,35 @@
33

44
class BaxterLeft(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Baxter_leftArm', 7, base_name='Baxter')
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Baxter_leftArm',
15+
7,
16+
base_name='Baxter',
17+
max_velocity=max_velocity,
18+
max_acceleration=max_acceleration,
19+
)
820

921

1022
class BaxterRight(Arm):
1123

12-
def __init__(self, count: int = 0):
13-
super().__init__(count, 'Baxter_rightArm', 7, base_name='Baxter')
24+
def __init__(
25+
self,
26+
count: int = 0,
27+
max_velocity: float = 1.0,
28+
max_acceleration: float = 4.0
29+
):
30+
super().__init__(
31+
count,
32+
'Baxter_rightArm',
33+
7,
34+
base_name='Baxter',
35+
max_velocity=max_velocity,
36+
max_acceleration=max_acceleration,
37+
)

pyrep/robots/arms/dobot.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class Dobot(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Dobot', 4)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Dobot',
15+
4,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/jaco.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class Jaco(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Jaco', 6)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Jaco',
15+
6,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/lbr_iiwa_14_r820.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class LBRIwaa14R820(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'LBR_iiwa_14_R820', 7)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'LBR_iiwa_14_R820',
15+
7,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/lbr_iiwa_7_r800.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class LBRIwaa7R800(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'LBR_iiwa_7_R800', 7)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'LBR_iiwa_7_R800',
15+
7,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/locobot_arm.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class LoCoBotArm(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'LoCoBotArm', 5)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'LoCoBotArm',
15+
5,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/mico.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class Mico(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Mico', 6)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Mico',
15+
6,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/panda.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class Panda(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Panda', 7)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Panda',
15+
7,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/sawyer.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33

44
class Sawyer(Arm):
5-
6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'Sawyer', 7)
5+
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'Sawyer',
15+
7,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/ur10.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class UR10(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'UR10', 6)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'UR10',
15+
6,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/ur3.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class UR3(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'UR3', 6)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'UR3',
15+
6,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/ur5.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class UR5(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'UR5', 6)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'UR5',
15+
6,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/xarm7.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class XArm7(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'xarm', 7)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'xarm',
15+
7,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

pyrep/robots/arms/youBot.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,16 @@
33

44
class youBot(Arm):
55

6-
def __init__(self, count: int = 0):
7-
super().__init__(count, 'YouBot', 5)
6+
def __init__(
7+
self,
8+
count: int = 0,
9+
max_velocity: float = 1.0,
10+
max_acceleration: float = 4.0
11+
):
12+
super().__init__(
13+
count,
14+
'YouBot',
15+
5,
16+
max_velocity=max_velocity,
17+
max_acceleration=max_acceleration,
18+
)

0 commit comments

Comments
 (0)