8000 make robust to lack of basemesh · hzyjerry/robotics-toolbox-python@fbb50c7 · GitHub
[go: up one dir, main page]

Skip to content

Commit fbb50c7

Browse files
committed
make robust to lack of basemesh
1 parent e9cfddc commit fbb50c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

roboticstoolbox/backends/VPython/graphicalrobot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,11 @@ def __init__(self, graphics_canvas, name, robot=None):
538538
zero_angles = np.zeros((self.robot.n,))
539539
all_poses = self.robot.fkine_all(zero_angles, old=False)
540540
# Create the base
541-
if robot.basemesh is not None:
542-
self.append_link("s", all_poses[0], robot.basemesh, [0, 0], 0)
541+
try:
542+
if robot.basemesh is not None:
543+
self.append_link("s", all_poses[0], robot.basemesh, [0, 0], 0)
544+
except:
545+
pass
543546
# else: assume no base joint
544547
robot_colours = robot.linkcolormap()
545548
# Create the joints

0 commit comments

Comments
 (0)
0