Skip to content

Commit 8a63a12

Browse files
committed
Fix #296 link count was incorrect for erobots
1 parent 056da02 commit 8a63a12

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

roboticstoolbox/robot/ERobot.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ def visit_link(link, jindex):
271271
# Initialise Robot object
272272
super().__init__(orlinks, **kwargs)
273273

274+
# Fix number of links for gripper links
275+
self._nlinks = len(links)
276+
277+
for gripper in self.grippers:
278+
self._nlinks += len(gripper.links)
279+
274280
# SceneNode, set a reference to the first link
275281
self.scene_children = [self.links[0]] # type: ignore
276282

@@ -795,7 +801,7 @@ def recurse(link: Link):
795801

796802
# --------------------------------------------------------------------- #
797803

798-
def fkine_all(self, q, old=None):
804+
def fkine_all(self, q):
799805
"""
800806
Compute the pose of every link frame
801807
@@ -833,6 +839,8 @@ def recurse(Tall, Tparent, q, link):
833839
else:
834840
T *= SE2(link.A(q[link.jindex]))
835841

842+
print(T)
843+
print(link.number)
836844
Tall[link.number] = T
837845

838846
if link.nchildren == 1:

0 commit comments

Comments
 (0)