File tree 1 file changed +7
-6
lines changed
roboticstoolbox/backends/PyPlot
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ def __init__(
22
22
name = True ,
23
23
options = None ,
24
24
):
25
-
26
25
super (RobotPlot , self ).__init__ ()
27
26
28
27
# Readonly - True for this robot is for displaying only
@@ -129,7 +128,7 @@ def draw(self):
129
128
130
129
# add new ee coordinate frame
131
130
for link in self .robot .ee_links :
132
- Te = T [link .number ]
131
+ Te = T [link .number ] * self . robot . tool
133
132
134
133
# ee axes arrows
135
134
Tex = Te * Tjx
@@ -156,11 +155,15 @@ def draw(self):
156
155
if self .jointaxes :
157
156
# Plot joint z coordinates
158
157
for link in self .robot :
159
-
160
158
direction = None
161
159
if isinstance (self .robot , rp .DHRobot ):
162
160
# should test MDH I think
163
- Tj = T [link .number - 1 ]
161
+
162
+ if self .robot .mdh :
163
+ Tj = T [link .number ]
164
+ else :
165
+ Tj = T [link .number - 1 ]
166
+
164
167
R = Tj .R
165
168
direction = R [:, 2 ] # z direction
166
169
elif link .isjoint :
@@ -178,7 +181,6 @@ def draw(self):
178
181
self .joints .extend (arrow )
179
182
180
183
def init (self ):
181
-
182
184
self .drawn = True
183
185
184
186
if self .env .limits is None :
@@ -203,7 +205,6 @@ def init(self):
203
205
self .links = []
204
206
self .sh_links = []
205
207
for i in range (len (self .segments )):
206
-
207
208
# Plot the shadow of the robot links, draw first so robot is always
208
209
# in front
209
210
if self .shadow :
You can’t perform that action at this time.
0 commit comments