Skip to content

Commit

Permalink
support setting max_velocity and max_acceleration for arms (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
younggyoseo committed Jul 2, 2024
1 parent 0c0d399 commit 8f420be
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 31 deletions.
32 changes: 28 additions & 4 deletions pyrep/robots/arms/baxter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,35 @@

class BaxterLeft(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Baxter_leftArm', 7, base_name='Baxter')
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Baxter_leftArm',
7,
base_name='Baxter',
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)


class BaxterRight(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Baxter_rightArm', 7, base_name='Baxter')
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Baxter_rightArm',
7,
base_name='Baxter',
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/dobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class Dobot(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Dobot', 4)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Dobot',
4,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/jaco.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class Jaco(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Jaco', 6)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Jaco',
6,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/lbr_iiwa_14_r820.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class LBRIwaa14R820(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'LBR_iiwa_14_R820', 7)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'LBR_iiwa_14_R820',
7,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/lbr_iiwa_7_r800.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class LBRIwaa7R800(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'LBR_iiwa_7_R800', 7)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'LBR_iiwa_7_R800',
7,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/locobot_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class LoCoBotArm(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'LoCoBotArm', 5)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'LoCoBotArm',
5,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/mico.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class Mico(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Mico', 6)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Mico',
6,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class Panda(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Panda', 7)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Panda',
7,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
17 changes: 14 additions & 3 deletions pyrep/robots/arms/sawyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@


class Sawyer(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'Sawyer', 7)

def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'Sawyer',
7,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/ur10.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class UR10(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'UR10', 6)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'UR10',
6,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/ur3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class UR3(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'UR3', 6)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'UR3',
6,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/ur5.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class UR5(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'UR5', 6)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'UR5',
6,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/xarm7.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class XArm7(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'xarm', 7)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'xarm',
7,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)
15 changes: 13 additions & 2 deletions pyrep/robots/arms/youBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@

class youBot(Arm):

def __init__(self, count: int = 0):
super().__init__(count, 'YouBot', 5)
def __init__(
self,
count: int = 0,
max_velocity: float = 1.0,
max_acceleration: float = 4.0
):
super().__init__(
count,
'YouBot',
5,
max_velocity=max_velocity,
max_acceleration=max_acceleration,
)

0 comments on commit 8f420be

Please sign in to comment.