Skip to content

Commit eccd9b8

Browse files
l00p3Benedikt Mersch
andauthored
Update python/kiss_icp/tools/visualizer.py
Co-authored-by: Benedikt Mersch <mersch@igg.uni-bonn.de>
1 parent 2ab408b commit eccd9b8

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

python/kiss_icp/tools/visualizer.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,10 @@ def _quit_callback(self):
268268

269269
def _trajectory_pick_callback(self):
270270
if self._gui.GetIO().MouseClicked[0]:
271-
name = ""
272-
idx = 0
273271
pick_selection = self._ps.get_selection()
274-
if pick_selection.is_hit:
275-
name = pick_selection.structure_name
276-
idx = pick_selection.structure_data["index"]
272+
name = pick_selection.structure_name
277273
if name == "trajectory" and self._ps.has_point_cloud(name):
278-
pose = self._trajectory[idx]
274+
pose = self._trajectory[pick_selection.structure_data["index"]]
279275
self._selected_pose = f"x: {pose[0]:7.3f}, y: {pose[1]:7.3f}, z: {pose[2]:7.3f}>"
280276
else:
281277
self._selected_pose = ""

0 commit comments

Comments
 (0)