File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import numpy as np
7
7
from collections import namedtuple
8
- from roboticstoolbox .tools .null import null
8
+ # from roboticstoolbox.tools.null import null
9
+ import roboticstoolbox as rtb
9
10
from spatialmath import base
10
- from spatialmath import SE3 , Twist3
11
+ from spatialmath import SE3
11
12
import scipy .optimize as opt
12
13
import math
13
14
import qpsolvers as qp
@@ -288,7 +289,14 @@ def ikine_LM(
288
289
nm = 0
289
290
290
291
# bool vector indicating revolute joints
291
- revolutes = np .array ([link .isrevolute for link in self ])
292
+ # revolutes = np.array([link.isrevolute for link in self])
293
+
294
+ revolutes = []
295
+
296
+ for link in self :
297
+ if isinstance (self , rtb .DHRobot ) or link .isjoint :
298
+ revolutes .append (link .isrevolute )
299
+ revolutes = np .array (revolutes )
292
300
293
301
q = q0
294
302
for Tk in T :
@@ -500,7 +508,7 @@ def ikine_LMS(
500
508
revolutes = []
501
509
502
510
for link in self :
503
- if link .isjoint :
511
+ if isinstance ( self , rtb . DHRobot ) or link .isjoint :
504
512
revolutes .append (link .isrevolute )
505
513
revolutes = np .array (revolutes )
506
514
You can’t perform that action at this time.
0 commit comments