8000 Deprecate SerialLink in favour of DHRobot · yobzhuu/robotics-toolbox-python@3b466ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b466ec

Browse files
committed
Deprecate SerialLink in favour of DHRobot
1 parent 2129ac4 commit 3b466ec

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roboticstoolbox/robot/SerialLink.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from roboticstoolbox.robot.Dynamics import Dynamics
2020

2121

22-
class SerialLink(Dynamics):
22+
class DHRobot(Dynamics):
2323
"""
2424
A superclass for arm type robots. A concrete class that represents a
2525
serial-link arm-type robot. Each link and joint in the chain is
@@ -67,7 +67,7 @@ def __init__(
6767
self.tool = tool
6868
self.gravity = gravity
6969

70-
super(SerialLink, self).__init__()
70+
super().__init__()
7171

7272
# Verify L
7373
if not isinstance(L, list):
@@ -2981,3 +2981,8 @@ def teach2(
29812981
# print(
29822982
# 'Could not find matplotlib.'
29832983
# ' Matplotlib required for this function')
2984+
2985+
class SerialLink(DHRobot):
2986+
def __init__(self, *args, **kwargs):
2987+
print('SerialLink is deprecated, use DHRobot instead')
2988+
super().__init__(*args, **kwargs)

0 commit comments

Comments
 (0)
0