Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting max_velocity and max_acceleration for arms #376

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
)
Loading