Skip to content

Commit 93cdc84

Browse files
authored
Fix viewer memory lifecycle (#34)
* Fix memory lifecycle bug in tesseract_viewer.py * Fix planning future field in abb viewer example
1 parent fe72816 commit 93cdc84

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

tesseract_viewer_python/examples/abb_irb2400_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def locateResource(self, url):
8989

9090
assert response.interface.isSuccessful()
9191

92-
results = flatten(response.getResults().as_CompositeInstruction())
92+
results = flatten(response.problem.getResults().as_CompositeInstruction())
9393

9494
viewer.update_trajectory(results)
9595

tesseract_viewer_python/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>tesseract_viewer_python</name>
4-
<version>0.2.1</version>
4+
<version>0.2.2</version>
55
<description>The tesseract_viewer_python package</description>
66
<maintainer email="wason@wasontech.com">John Wason</maintainer>
77
<license>Apache 2.0</license>

tesseract_viewer_python/tesseract_robotics_viewer/tesseract_viewer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ def update_trajectory(self, tesseract_trajectory):
158158

159159
start_instruction_o = tesseract_trajectory[0]
160160
assert isMoveInstruction(start_instruction_o)
161-
start_waypoint_o = start_instruction_o.as_MoveInstruction().getWaypoint()
161+
start_waypoint_m = start_instruction_o.as_MoveInstruction()
162+
start_waypoint_o = start_waypoint_m.getWaypoint()
162163
assert isStateWaypoint(start_waypoint_o)
163164
start_waypoint = start_waypoint_o.as_StateWaypoint()
164165

@@ -171,7 +172,8 @@ def update_trajectory(self, tesseract_trajectory):
171172
for i in range(len(tesseract_trajectory)):
172173
instr = tesseract_trajectory[i]
173174
assert isMoveInstruction(instr)
174-
wp = instr.as_MoveInstruction().getWaypoint()
175+
instr_m = instr.as_MoveInstruction()
176+
wp = instr_m.getWaypoint()
175177
assert isStateWaypoint(wp)
176178
state_wp = wp.as_StateWaypoint()
177179
trajectory2.append(state_wp.position.flatten().tolist() + [state_wp.time])

0 commit comments

Comments
 (0)