Skip to content

Commit 2c74fc8

Browse files
committed
for IK of trajectory, returned tuple or arrays, not array of tuples
1 parent c7b415e commit 2c74fc8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roboticstoolbox/robot/DHRobot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,10 +1613,13 @@ def ikine_6s(self, T, config, ikfunc):
16131613

16141614
solutions.append(solution)
16151615

1616-
if len(solutions) == 1:
1616+
if len(T) == 1:
16171617
return solutions[0]
16181618
else:
1619-
return solutions
1619+
return iksol(
1620+
np.vstack([sol.q for sol in solutions]),
1621+
np.array([sol.success for sol in solutions]),
1622+
[sol.reason for sol in solutions])
16201623

16211624
def config_validate(self, config, allowables):
16221625
"""

0 commit comments

Comments
 (0)