File tree Expand file tree Collapse file tree 3 files changed +65
-65
lines changed Expand file tree Collapse file tree 3 files changed +65
-65
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,14 @@ def __init__(
83
83
self ._n += 1
84
84
L [i ].id = self ._n
85
85
86
- elif isinstance (L [i ], SerialLink ):
86
+ elif isinstance (L [i ], DHRobot ):
87
87
for j in range (L [i ].n ):
88
88
self ._links .append (L [i ].links [j ])
89
89
self ._n += 1
90
90
L [i ].id = self ._n
91
91
92
92
else :
93
- raise TypeError ("Input can be only DHLink or SerialLink " )
93
+ raise TypeError ("Input can be only DHLink or DHRobot " )
94
94
95
95
# Current joint angles of the robot
96
96
self .q = np .zeros (self .n )
@@ -164,14 +164,14 @@ def __add__(self, L):
164
164
165
165
if isinstance (L , DHLink ):
166
166
nlinks .append (L )
167
- elif isinstance (L , SerialLink ):
167
+ elif isinstance (L , DHRobot ):
168
168
for j in range (L .n ):
169
169
nlinks .append (L .links [j ])
170
170
else :
171
- raise TypeError ("Can only combine SerialLinks with other "
172
- "SerialLinks or DHLinks" )
171
+ raise TypeError ("Can only combine DHRobots with other "
172
+ "DHRobots or DHLinks" )
173
173
174
- return SerialLink (
174
+ return DHRobot (
175
175
nlinks ,
176
176
name = self .name ,
177
177
manufacturer = self .manuf ,
@@ -185,7 +185,7 @@ def _copy(self):
185
185
for i in range (self .n ):
186
186
L .append (self .links [i ]._copy ())
187
187
188
- r2 = SerialLink (
188
+ r2 = DHRobot (
189
189
L ,
190
190
name = self .name ,
191
191
manufacturer = self .manuf ,
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def test_add(self):
128
128
l0 = rp .DHLink ()
129
129
l1 = rp .DHLink ()
130
130
131
- self .assertIsInstance (l0 + l1 , rp .SerialLink )
131
+ self .assertIsInstance (l0 + l1 , rp .DHRobot )
132
132
self .assertRaises (TypeError , l0 .__add__ , 1 )
133
133
134
134
def test_properties (self ):
You can’t perform that action at this time.
0 commit comments