rqt_editor.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import os
4 import math
5 
6 import rospy
7 import rospkg
8 import tf
9 
10 from qt_gui_py_common.worker_thread import WorkerThread
11 
12 from python_qt_binding import loadUi, QtCore, QtWidgets
13 from python_qt_binding.QtWidgets import QWidget, QTreeWidgetItem, QTreeWidget, QProgressBar
14 from python_qt_binding.QtCore import Slot, Qt, QTimer
15 from python_qt_binding.QtGui import QColor
16 
17 from frame_editor.editor import Frame, FrameEditor
18 from frame_editor.commands import *
20 
21 from frame_editor.project_plugin import ProjectPlugin
22 
23 from frame_editor.interface import Interface
24 
25 
26 from frame_editor.interface_gui import FrameEditor_StyleWidget
27 
28 class LoadingTreeWidgetItem(QTreeWidgetItem):
29  def __init__(self, parent, load_time=0.5):
30  super().__init__(parent)
31  self.parent = parent
32 
33  # Create a QProgressBar to simulate loading
34  self.progress_bar = QProgressBar()
35  self.load_increments = load_time / (100/1000)
36  self.progress_bar.setRange(0, self.load_increments)
37  self.progress_bar.setValue(0)
38  self.progress_bar.setTextVisible(False) # Hide the text inside the progress bar
39 
40  # Set the progress bar widget to the tree item
41  self.parent.setItemWidget(self, 0, self.progress_bar)
42 
43  # Add a timer to simulate progress increment
44  self.timer = QTimer(self.parent)
45  self.timer.timeout.connect(self.update_progress)
46  self.timer.start(100) # Update every 100 ms
47 
48  def update_progress(self):
49  """Update progress bar value to simulate loading."""
50  current_value = self.progress_bar.value()
51 
52  if current_value < self.progress_bar.maximum():
53  self.progress_bar.setValue(current_value + 1)
54  else:
55  self.timer.stop() # Stop the timer when loading completes
56  self.progress_bar.setValue(0) # Reset the progress bar or hide it
57 
59 
60  signal_update = QtCore.Signal(int)
61  signal_update_tf = QtCore.Signal(bool, bool)
62  signal_load_animation = QtCore.Signal()
63 
64  def __init__(self, context):
65  super(FrameEditorGUI, self).__init__(context)
66 
67  self.setObjectName('FrameEditorGUI')
68 
69  self.file_type = "YAML files(*.yaml)"
70 
71  self.editor.parse_args(context.argv())
72 
73  # Update filename display
75 
76 
77 
79  self._update_thread.start()
80  self.update_all(3)
81 
82 
83  def create_editor(self, context):
84  editor = FrameEditor(context)
85 
86  editor.observers.append(self)
87 
88  self.signal_update.connect(self.update_all)
89  self.signal_update_tf.connect(self.update_frame_buffer)
91 
93 
94  self.old_selected = ""
95 
96  return editor
97 
98 
99  def create_main_widget(self):
100 
101 
102  widget = QWidget()
103  ui_file = os.path.join(rospkg.RosPack().get_path('frame_editor'), 'src/frame_editor', 'FrameEditorGUI.ui')
104  loadUi(ui_file, widget)
105  widget.setObjectName('FrameEditorGUIUi')
106 
107  widget.setWindowTitle("frame editor")
108 
109 
110  self.editor.init_views()
112 
113  widget.style_frame.layout().addWidget(self.interface_style.get_widget())
114 
115 
117  widget.btn_add.clicked.connect(self.btn_add_clicked)
118  widget.btn_delete.clicked.connect(self.btn_delete_clicked)
119  widget.btn_duplicate.clicked.connect(self.btn_duplicate_clicked)
120  widget.list_frames.currentItemChanged.connect(self.selected_frame_changed)
121  widget.list_tf.currentItemChanged.connect(self.update_measurement)
122 
123  widget.btn_refresh.clicked.connect(lambda: self.signal_update_tf.emit(True, True))
124 
125  widget.btn_set_parent_rel.clicked.connect(self.btn_set_parent_rel_clicked)
126  widget.btn_set_parent_abs.clicked.connect(self.btn_set_parent_abs_clicked)
127  widget.btn_set_pose.clicked.connect(self.btn_set_pose_clicked)
128  widget.btn_set_position.clicked.connect(self.btn_set_position_clicked)
129  widget.btn_set_orientation.clicked.connect(self.btn_set_orientation_clicked)
130  widget.btn_set_x.clicked.connect(self.btn_set_x_clicked)
131  widget.btn_set_y.clicked.connect(self.btn_set_y_clicked)
132  widget.btn_set_z.clicked.connect(self.btn_set_z_clicked)
133  widget.btn_set_a.clicked.connect(self.btn_set_a_clicked)
134  widget.btn_set_b.clicked.connect(self.btn_set_b_clicked)
135  widget.btn_set_c.clicked.connect(self.btn_set_c_clicked)
136 
137  widget.searchLine.textChanged.connect(self.update_search_suggestions)
138  widget.search_tf.textChanged.connect(self.update_tf_list)
139 
140  widget.btn_reset_position_rel.clicked.connect(self.btn_reset_position_rel_clicked)
141  widget.btn_reset_position_abs.clicked.connect(self.btn_reset_position_abs_clicked)
142  widget.btn_reset_orientation_rel.clicked.connect(self.btn_reset_orientation_rel_clicked)
143  widget.btn_reset_orientation_abs.clicked.connect(self.btn_reset_orientation_abs_clicked)
144 
145  widget.txt_x.editingFinished.connect(self.x_valueChanged)
146  widget.txt_y.editingFinished.connect(self.y_valueChanged)
147  widget.txt_z.editingFinished.connect(self.z_valueChanged)
148  widget.txt_a.editingFinished.connect(self.a_valueChanged)
149  widget.txt_b.editingFinished.connect(self.b_valueChanged)
150  widget.txt_c.editingFinished.connect(self.c_valueChanged)
151 
152  widget.txt_group.editingFinished.connect(self.group_valueChanged)
153 
154  widget.btn_rad.toggled.connect(self.update_fields)
155 
156  widget.combo_style.currentIndexChanged.connect(self.frame_style_changed)
157 
158  return widget
159 
160 
162  self.editor.run()
163 
164  @Slot()
165  def _update_finished(self):
166  rospy.loginfo("> Shutting down")
167 
168 
169  def update(self, editor, level, elements):
170  self.signal_update.emit(level)
171 
172 
173  @Slot(int)
174  def update_all(self, level):
175  if level & 0:
177 
178 
179  if level & 1:
180  self.update_frame_list()
181  self.update_tf_list()
182 
183 
184  if level & 2:
185  self.update_active_frame()
186 
187 
188  if level & 4:
189  self.update_fields()
190 
191  def update_tf_list_search(self, search_query=""):
192  """
193  Updates the tree with items that match the search query and groups them
194  under two collapsible categories.
195  """
196  # Clear the existing items in the tree
197  self.widget.list_tf.clear()
198 
199  # Create root items for grouping
200  frame_group = QTreeWidgetItem(self.widget.list_tf)
201  frame_group.setText(0, "Frames")
202  frame_group.setExpanded(True)
203 
204  other_group = QTreeWidgetItem(self.widget.list_tf)
205  other_group.setText(0, "Others")
206  other_group.setExpanded(True)
207 
208  items = sorted(self.editor.all_frame_ids(include_temp=False))
209  # Loop through the frames and add them to the appropriate group
210  for item in items:
211  tree_item = QTreeWidgetItem() # Create a new tree item
212  tree_item.setText(0, item) # Set the text for the item (first column)
213 
214  # Check if the item is part of self.editor.frames.keys()
215  if item in self.editor.frames.keys():
216  group = frame_group # Add to the 'Frames' group
217  else:
218  group = other_group # Add to the 'Others' group
219 
220  # Apply grey styling based on the search query and filter style
221  if search_query.lower() in item.lower() or self.editor.filter_style == "grey":
222  if self.editor.filter_style == "grey":
223  if search_query.lower() in item.lower():
224  tree_item.setForeground(0, Qt.black) # Set normal color for matching items
225  else:
226  tree_item.setForeground(0, QColor(169, 169, 169)) # Grey out non-matching items
227  group.addChild(tree_item) # Add the item to the corresponding group
228 
229  # Sort the items after adding them
230  self.widget.list_tf.sortItems(0, Qt.AscendingOrder)
231 
233  # Clear the existing items in the tree
234  self.widget.list_tf.clear()
235 
236  # Add the loading animation item to the root
237  LoadingTreeWidgetItem(self.widget.list_tf, load_time=self.get_sleep_time()*0.99) # This creates the loading item with a progress bar
238 
239  self.widget.list_tf.expandAll()
240 
241  @Slot()
242  def update_tf_list(self):
243  """
244  Updates the displayed tree items based on the search query entered in searchLine.
245  """
246  search_query = self.widget.search_tf.text()
247  self.update_tf_list_search(search_query)
248 
249 
250 
251 
253  def update_frame_list(self, search_query=""):
254  """
255  Updates the tree with items that match the search query.
256  Group frames based on their `group` attribute, with collapsible groups.
257  Non-group frames are added without grouping or collapsibility.
258  If filter_style is 'hide', top-level items are hidden only if they do not match the search query.
259  """
260  # Clear the existing items in the tree
261  self.widget.list_frames.clear()
262 
263  # Get the frame names (or keys) from self.editor.frames
264  items = sorted(self.editor.frames.keys()) # Sorting the items
265 
266  # Dictionary to hold the group items, to ensure only one root per group
267  group_list = {}
268 
269  # Loop through the frames to create group root items
270  for element in items:
271  group = self.editor.frames[element].group
272  if group != "": # If the frame has a group
273  if group not in group_list: # Only create the group root item once
274  frame_group = QTreeWidgetItem(self.widget.list_frames)
275  frame_group.setText(0, group) # Set the group name
276  frame_group.setExpanded(True) # Make the group expanded by default
277  frame_group.setFlags(frame_group.flags() & ~Qt.ItemIsSelectable)
278  group_list[group] = frame_group
279 
280  # Loop through the frames and add them to the appropriate group or main list
281  for item in items:
282  tree_item = QTreeWidgetItem()
283  tree_item.setText(0, item)
284  tree_item.setFlags(tree_item.flags() | Qt.ItemIsSelectable)
285 
286  # Check if the frame has a group
287  group = self.editor.frames[item].group
288  if group != "": # If the frame belongs to a group
289  # Add the frame as a child item of the respective group
290  group_item = group_list[group]
291  else: # If it doesn't belong to any group
292  # Just add the frame as a root item without grouping
293  group_item = self.widget.list_frames
294 
295 
296  # Apply grey styling based on the search query and filter style
297  match_found = search_query.lower() in item.lower() # Check if the item matches the search query
298 
299 
300  if match_found or self.editor.filter_style == "grey":
301  if self.editor.filter_style == "grey":
302  if match_found:
303  tree_item.setForeground(0, Qt.black) # Set normal color for matching items
304  else:
305  tree_item.setForeground(0, QColor(169, 169, 169)) # Grey out non-matching items
306 
307  # If filter_style is 'hide', skip adding top-level items that don't match the search query
308  if self.editor.filter_style == "hide" and group_item == self.widget.list_frames and not match_found:
309  continue # Skip adding the top-level item if it doesn't match the search query
310 
311  # Add the tree item to the appropriate group or directly to the list
312  if isinstance(group_item, QTreeWidgetItem): # Ensure group_item is a QTreeWidgetItem
313  group_item.addChild(tree_item) # Add to group
314  else:
315  self.widget.list_frames.addTopLevelItem(tree_item) # Add to main list directly
316 
317  # Sort the items after adding them
318  self.widget.list_frames.sortItems(0, Qt.AscendingOrder)
319 
320 
321 
323  """
324  Updates the displayed tree items based on the search query entered in searchLine.
325  """
326  search_query = self.widget.searchLine.text()
327  self.update_frame_list(search_query)
328 
329 
331  if not self.editor.active_frame:
332  self.old_selected = ""
333  self.widget.list_frames.setCurrentItem(None)
334  self.widget.box_edit.setEnabled(False)
335  return # Deselect and quit
336 
337  self.widget.box_edit.setEnabled(True)
338 
339  name = self.editor.active_frame.name
340  if name == self.old_selected:
341  return # No change
342 
343  # Search for the item by name in both top-level and child items
344  found_item = None
345 
346  # First, search in top-level items
347  top_level_items = self.widget.list_frames.findItems(name, Qt.MatchExactly)
348 
349  # If not found at the top level, search lower
350  if not top_level_items:
351  for i in range(self.widget.list_frames.topLevelItemCount()):
352  top_item = self.widget.list_frames.topLevelItem(i)
353  found_item = self.find_item_in_children(top_item, name)
354  if found_item:
355  break
356  else:
357  found_item = top_level_items[0]
358 
359  if found_item:
360  # Set the found item as the current item
361  self.widget.list_frames.setCurrentItem(found_item)
362  self.update_fields()
363 
364  self.old_selected = name
365 
367  source = self.widget.list_tf.currentItem()
368  if not source:
369  return # none selected
370  source_name = source.text(0)
371  frame = self.editor.active_frame
372  try:
373  position, orientation = FromTransformStamped(
374  frame.tf_buffer.lookup_transform(source_name, frame.name, rospy.Time(0)))
375 
376  rot = tf.transformations.euler_from_quaternion(orientation)
377  if self.widget.btn_deg.isChecked():
378  rot = (180.0*rot[0]/math.pi, 180.0*rot[1]/math.pi, 180.0*rot[2]/math.pi)
379 
380  pos_str = [f"{p:.4f}" for p in position]
381  rot_str = [f"{r:.4f}" for r in rot]
382  except (tf2_ros.ConnectivityException, tf2_ros.LookupException):
383  pos_str = ['N/A', 'N/A', 'N/A']
384  rot_str = pos_str
385 
386  self.widget.valx.setText(pos_str[0])
387  self.widget.valy.setText(pos_str[1])
388  self.widget.valz.setText(pos_str[2])
389 
390  self.widget.vala.setText(rot_str[0])
391  self.widget.valb.setText(rot_str[1])
392  self.widget.valc.setText(rot_str[2])
393 
394 
395  def find_item_in_children(self, parent_item, name):
396  """
397  Recursively search for the item in the children of a given parent item.
398  """
399  # Loop through all child items of the parent item
400  for i in range(parent_item.childCount()):
401  child_item = parent_item.child(i)
402  if child_item.text(0) == name:
403  return child_item # Return the item if it matches
404 
405  return None # Return None if no match is found in this branch
406 
407  @Slot()
408  def update_fields(self):
409 
410  f = self.editor.active_frame
411  if not f:
412  return
413 
414  w = self.widget
415 
416  w.txt_name.setText(f.name)
417  w.txt_parent.setText(f.parent)
418  w.txt_group.setText(f.group)
419  self.update_measurement()
420 
421 
422  w.txt_x.setValue(f.position[0])
423  w.txt_y.setValue(f.position[1])
424  w.txt_z.setValue(f.position[2])
425 
426  rot = tf.transformations.euler_from_quaternion(f.orientation)
427  if self.widget.btn_deg.isChecked():
428  rot = (180.0*rot[0]/math.pi, 180.0*rot[1]/math.pi, 180.0*rot[2]/math.pi)
429 
430  w.txt_a.setValue(rot[0])
431  w.txt_b.setValue(rot[1])
432  w.txt_c.setValue(rot[2])
433 
434  txt_abs_pos = (w.txt_abs_x, w.txt_abs_y, w.txt_abs_z)
435  txt_abs_rot = (w.txt_abs_a, w.txt_abs_b, w.txt_abs_c)
436 
437 
438  try:
439  position, orientation = FromTransformStamped(
440  f.tf_buffer.lookup_transform('world', f.name, rospy.Time(0)))
441  for txt, p in zip(txt_abs_pos, position):
442  txt.setEnabled(True)
443  txt.setValue(p)
444  rot = tf.transformations.euler_from_quaternion(orientation)
445  if self.widget.btn_deg.isChecked():
446  rot = map(math.degrees, rot)
447  for txt, r in zip(txt_abs_rot, rot):
448  txt.setEnabled(True)
449  txt.setValue(r)
450  except:
451  for txt in txt_abs_rot + txt_abs_pos:
452  txt.setEnabled(False)
453 
454 
455  self.widget.combo_style.setCurrentIndex(self.widget.combo_style.findText(f.style))
456 
457 
458  @Slot(QTreeWidgetItem, QTreeWidgetItem)
459  def selected_frame_changed(self, item, previous):
460  # 'item' is the currently selected item (QTreeWidgetItem)
461  if item is None:
462  return
463 
464  name = item.text(0) # Get the text of the selected item
465 
466  if name not in self.editor.frames:
467  return
468 
469  if name == "":
470  return
471 
472  # Perform the selection logic as before
473  if not self.editor.active_frame or (self.editor.active_frame.name != name):
474  self.editor.command(Command_SelectElement(self.editor, self.editor.frames[name]))
475  self.update_measurement()
476 
477 
479  def write_file(self, file_name):
480  return self.editor.save_file(file_name)
481 
482 
483  @Slot()
484  def clear_all(self):
485  self.editor.command(Command_ClearAll(self.editor))
486 
487  def get_valid_frame_name(self, window_title, default_name="my_frame"):
488 
489  existing_tf_frames = set(self.editor.all_frame_ids())
490  existing_editor_frames = set(self.editor.all_editor_frame_ids())
491 
492  name, ok = QtWidgets.QInputDialog.getText(self.widget, window_title, "Name:", QtWidgets.QLineEdit.Normal, default_name);
493 
494  # allow recreating if frame was published by frameditor node originally
495  while ok and name in existing_editor_frames or (name in existing_tf_frames and not Frame.was_published_by_frameeditor(name)):
496  name, ok = QtWidgets.QInputDialog.getText(self.widget, window_title, "Name (must be unique):", QtWidgets.QLineEdit.Normal, default_name)
497  if not ok:
498  return None
499  return name
500 
501 
502  @Slot(bool)
503  def btn_add_clicked(self, checked):
504 
505  name = self.get_valid_frame_name("Add New Frame")
506  if not name:
507  return
508 
509  available_parents = self.editor.all_frame_ids(include_temp=False)
510  if not available_parents:
511  available_parents = ["world"]
512 
513  parent, ok = QtWidgets.QInputDialog.getItem(self.widget, "Add New Frame", "Parent Name:", sorted(available_parents))
514 
515  if not ok or parent == "":
516  return
517 
518  self.editor.command(Command_AddElement(self.editor, Frame(name, parent=parent)))
519  self.signal_update_tf.emit(False, False)
520 
521  @Slot(bool)
522  def btn_duplicate_clicked(self, checked):
523  item = self.widget.list_frames.currentItem()
524  if not item:
525  return
526  source_name = item.text(0)
527  parent_name = self.editor.frames[source_name].parent
528 
529  name = self.get_valid_frame_name("Duplicate Frame", default_name=source_name)
530  if not name:
531  return
532 
533  self.editor.command(Command_CopyElement(self.editor, name, source_name, parent_name))
534  self.signal_update_tf.emit(False, False)
535 
536  def get_sleep_time(self):
537  return max(5.0 / self.editor.hz, 0.1)
538 
539  @Slot(bool, bool)
540  def update_frame_buffer(self, animation=False, reset_buffer=True):
541  if animation:
542  self.signal_load_animation.emit()
543  sleep_time = self.get_sleep_time()*1000/2 # Time takes time in ms
544  if reset_buffer:
545  self.timer_clear_buffer = QTimer(self)
546  self.timer_clear_buffer.setSingleShot(True) # Run only once
547  self.timer_clear_buffer.timeout.connect(Frame.tf_buffer.clear)
548  self.timer_clear_buffer.start(sleep_time)
549 
550  self.timer_update_list = QTimer(self)
551  self.timer_update_list.setSingleShot(True) # Run only once
552  self.timer_update_list.timeout.connect(self.update_tf_list)
553  self.timer_update_list.start(sleep_time*2)
554 
555 
556  @Slot(bool)
557  def btn_delete_clicked(self, checked):
558  item = self.widget.list_frames.currentItem()
559  if not item:
560  return
561  self.editor.command(Command_RemoveElement(self.editor, self.editor.frames[item.text(0)]))
562  self.signal_update_tf.emit(True, True)
563 
564 
566  @Slot(bool)
567  def btn_set_parent_rel_clicked(self, checked):
568  self.set_parent(False)
569 
570  @Slot(bool)
571  def btn_set_parent_abs_clicked(self, checked):
572  self.set_parent(True)
573 
574  def set_parent(self, keep_absolute):
575  parent = self.widget.list_tf.currentItem()
576  if not parent:
577  return # none selected
578 
579  if parent.text(0) == self.editor.active_frame.name:
580  return # you can't be your own parent
581 
582  self.editor.command(Command_SetParent(self.editor, self.editor.active_frame, parent.text(0), keep_absolute))
583 
584 
585 
587  @Slot(bool)
588  def btn_set_pose_clicked(self, checked):
589  self.set_pose(["x", "y", "z", "a", "b", "c"])
590 
591  @Slot(bool)
592  def btn_set_position_clicked(self, checked):
593  self.set_pose(["x", "y", "z"])
594 
595  @Slot(bool)
596  def btn_set_orientation_clicked(self, checked):
597  self.set_pose(["a", "b", "c"])
598 
599  @Slot(bool)
600  def btn_set_x_clicked(self, checked):
601  self.set_pose(["x"])
602  @Slot(bool)
603  def btn_set_y_clicked(self, checked):
604  self.set_pose(["y"])
605  @Slot(bool)
606  def btn_set_z_clicked(self, checked):
607  self.set_pose(["z"])
608  @Slot(bool)
609  def btn_set_a_clicked(self, checked):
610  self.set_pose(["a"])
611  @Slot(bool)
612  def btn_set_b_clicked(self, checked):
613  self.set_pose(["b"])
614  @Slot(bool)
615  def btn_set_c_clicked(self, checked):
616  self.set_pose(["c"])
617 
618  def set_pose(self, mode):
619  source = self.widget.list_tf.currentItem()
620  if not source:
621  return # none selected
622 
623  frame = self.editor.active_frame
624  self.editor.command(Command_AlignElement(self.editor, frame, source.text(0), mode))
625 
626 
627 
629  @Slot(bool)
630  def btn_reset_position_rel_clicked(self, checked):
631  self.editor.command(Command_SetPosition(self.editor, self.editor.active_frame, (0, 0, 0)))
632 
633  @Slot(bool)
634  def btn_reset_position_abs_clicked(self, checked):
635  position, orientation = FromTransformStamped(
636  self.editor.active_frame.tf_buffer.lookup_transform(
637  self.editor.active_frame.parent, "world", rospy.Time(0)))
638  self.editor.command(Command_SetPosition(self.editor, self.editor.active_frame, position))
639 
640  @Slot(bool)
642  self.editor.command(Command_SetOrientation(self.editor, self.editor.active_frame, (0, 0, 0, 1)))
643 
644  @Slot(bool)
646  position, orientation = FromTransformStamped(
647  self.editor.active_frame.listener.lookupTransform(
648  self.editor.active_frame.parent, "world", rospy.Time(0)))
649  self.editor.command(Command_SetOrientation(self.editor, self.editor.active_frame, orientation))
650 
651 
652 
654  def set_value(self, widget, symbol):
655  frame = self.editor.active_frame
656  value = widget.value()
657 
658 
659  if self.widget.btn_deg.isChecked() and symbol in ['a', 'b', 'c']:
660  value = value * math.pi / 180.0
661 
662  if frame.value(symbol) != value:
663  self.editor.command(Command_SetValue(self.editor, self.editor.active_frame, symbol, value))
664 
665  @Slot()
666  def x_valueChanged(self):
667  self.set_value(self.widget.txt_x, 'x')
668  @Slot()
669  def y_valueChanged(self):
670  self.set_value(self.widget.txt_y, 'y')
671  @Slot()
672  def z_valueChanged(self):
673  self.set_value(self.widget.txt_z, 'z')
674  @Slot()
675  def a_valueChanged(self):
676  self.set_value(self.widget.txt_a, 'a')
677  @Slot()
678  def b_valueChanged(self):
679  self.set_value(self.widget.txt_b, 'b')
680  @Slot()
681  def c_valueChanged(self):
682  self.set_value(self.widget.txt_c, 'c')
683 
684  @Slot()
686  value = self.widget.txt_group.text()
687  if self.editor.active_frame.group != value:
688  self.editor.command(Command_SetGroup(self.editor, self.editor.active_frame, value))
689 
690 
691 
692 
694  @Slot(int)
695  def frame_style_changed(self, id):
696  style = self.widget.combo_style.currentText().lower()
697  if self.editor.active_frame.style != style:
698  self.editor.command(Command_SetStyle(self.editor, self.editor.active_frame, style))
699 
700 
701 
703  def shutdown_plugin(self):
704  super(FrameEditorGUI, self).shutdown_plugin()
705  self._update_thread.kill()
706 
707 # eof
frame_editor.rqt_editor.LoadingTreeWidgetItem
Definition: rqt_editor.py:28
frame_editor.rqt_editor.FrameEditorGUI.btn_set_orientation_clicked
def btn_set_orientation_clicked(self, checked)
Definition: rqt_editor.py:596
frame_editor.rqt_editor.FrameEditorGUI.timer_clear_buffer
timer_clear_buffer
Definition: rqt_editor.py:545
qt_gui_py_common::worker_thread::WorkerThread
frame_editor.rqt_editor.FrameEditorGUI.set_value
def set_value(self, widget, symbol)
Spin Boxes ##.
Definition: rqt_editor.py:654
frame_editor.rqt_editor.FrameEditorGUI.z_valueChanged
def z_valueChanged(self)
Definition: rqt_editor.py:672
frame_editor.rqt_editor.FrameEditorGUI.find_item_in_children
def find_item_in_children(self, parent_item, name)
Definition: rqt_editor.py:395
frame_editor.commands.Command_CopyElement
Definition: commands.py:157
frame_editor.rqt_editor.LoadingTreeWidgetItem.__init__
def __init__(self, parent, load_time=0.5)
Definition: rqt_editor.py:29
frame_editor.rqt_editor.FrameEditorGUI.update_frame_list
def update_frame_list(self, search_query="")
Definition: rqt_editor.py:253
frame_editor.interface
Definition: interface.py:1
frame_editor.rqt_editor.FrameEditorGUI.set_pose
def set_pose(self, mode)
Definition: rqt_editor.py:618
frame_editor.rqt_editor.FrameEditorGUI.get_valid_frame_name
def get_valid_frame_name(self, window_title, default_name="my_frame")
Definition: rqt_editor.py:487
frame_editor.project_plugin
Definition: project_plugin.py:1
frame_editor.rqt_editor.FrameEditorGUI.update
def update(self, editor, level, elements)
Definition: rqt_editor.py:169
frame_editor.rqt_editor.FrameEditorGUI.old_selected
old_selected
Definition: rqt_editor.py:94
frame_editor.interface_gui.FrameEditor_StyleWidget
Definition: interface_gui.py:14
frame_editor.commands.Command_SelectElement
Definition: commands.py:15
frame_editor.project_plugin.ProjectPlugin.update_current_filename
def update_current_filename(self)
Definition: project_plugin.py:213
frame_editor.commands.Command_AlignElement
Definition: commands.py:104
frame_editor.rqt_editor.FrameEditorGUI.interface_style
interface_style
Main widget.
Definition: rqt_editor.py:111
frame_editor.commands.Command_SetPosition
Definition: commands.py:271
frame_editor.commands.Command_SetStyle
Definition: commands.py:373
frame_editor.rqt_editor.FrameEditorGUI.signal_update
signal_update
Definition: rqt_editor.py:60
frame_editor.commands.Command_SetParent
Definition: commands.py:332
frame_editor.rqt_editor.FrameEditorGUI.y_valueChanged
def y_valueChanged(self)
Definition: rqt_editor.py:669
frame_editor.rqt_editor.FrameEditorGUI.write_file
def write_file(self, file_name)
BUTTONS ##.
Definition: rqt_editor.py:479
frame_editor.rqt_editor.FrameEditorGUI.timer_update_list
timer_update_list
Definition: rqt_editor.py:550
frame_editor.commands.Command_SetGroup
Definition: commands.py:487
frame_editor.interface_gui
Definition: interface_gui.py:1
frame_editor.rqt_editor.FrameEditorGUI.update_measurement
def update_measurement(self)
Definition: rqt_editor.py:366
frame_editor.rqt_editor.FrameEditorGUI._update_thread
_update_thread
Definition: rqt_editor.py:92
frame_editor.rqt_editor.FrameEditorGUI.frame_style_changed
def frame_style_changed(self, id)
FRAME STYLE ##.
Definition: rqt_editor.py:695
frame_editor.rqt_editor.FrameEditorGUI.btn_set_a_clicked
def btn_set_a_clicked(self, checked)
Definition: rqt_editor.py:609
frame_editor.project_plugin.ProjectPlugin.editor
editor
Editor.
Definition: project_plugin.py:15
frame_editor.rqt_editor.FrameEditorGUI.btn_reset_orientation_abs_clicked
def btn_reset_orientation_abs_clicked(self, checked)
Definition: rqt_editor.py:645
frame_editor.commands.Command_SetValue
Definition: commands.py:311
frame_editor.rqt_editor.LoadingTreeWidgetItem.load_increments
load_increments
Definition: rqt_editor.py:35
frame_editor.rqt_editor.FrameEditorGUI.signal_update_tf
signal_update_tf
Definition: rqt_editor.py:61
frame_editor.editor
Definition: editor.py:1
frame_editor.rqt_editor.FrameEditorGUI.btn_set_b_clicked
def btn_set_b_clicked(self, checked)
Definition: rqt_editor.py:612
frame_editor.rqt_editor.FrameEditorGUI.btn_add_clicked
def btn_add_clicked(self, checked)
Definition: rqt_editor.py:503
frame_editor.rqt_editor.LoadingTreeWidgetItem.parent
parent
Definition: rqt_editor.py:31
frame_editor.rqt_editor.FrameEditorGUI.update_search_suggestions
def update_search_suggestions(self)
Definition: rqt_editor.py:322
frame_editor.rqt_editor.FrameEditorGUI.set_tf_loading_animation
def set_tf_loading_animation(self)
Definition: rqt_editor.py:232
frame_editor.commands.Command_SetOrientation
Definition: commands.py:291
frame_editor.project_plugin.ProjectPlugin
Definition: project_plugin.py:9
frame_editor.rqt_editor.FrameEditorGUI.set_parent
def set_parent(self, keep_absolute)
Definition: rqt_editor.py:574
frame_editor.rqt_editor.FrameEditorGUI.signal_load_animation
signal_load_animation
Definition: rqt_editor.py:62
frame_editor.project_plugin.ProjectPlugin.widget
widget
Main widget.
Definition: project_plugin.py:19
frame_editor.commands
Definition: commands.py:1
frame_editor.rqt_editor.FrameEditorGUI.update_active_frame
def update_active_frame(self)
Definition: rqt_editor.py:330
frame_editor.rqt_editor.FrameEditorGUI
Definition: rqt_editor.py:58
frame_editor.rqt_editor.LoadingTreeWidgetItem.update_progress
def update_progress(self)
Definition: rqt_editor.py:48
frame_editor.rqt_editor.FrameEditorGUI.btn_delete_clicked
def btn_delete_clicked(self, checked)
Definition: rqt_editor.py:557
frame_editor.rqt_editor.FrameEditorGUI.btn_set_pose_clicked
def btn_set_pose_clicked(self, checked)
SET BUTTONS ##.
Definition: rqt_editor.py:588
frame_editor.rqt_editor.FrameEditorGUI.btn_set_parent_abs_clicked
def btn_set_parent_abs_clicked(self, checked)
Definition: rqt_editor.py:571
frame_editor.rqt_editor.FrameEditorGUI.btn_reset_orientation_rel_clicked
def btn_reset_orientation_rel_clicked(self, checked)
Definition: rqt_editor.py:641
frame_editor.rqt_editor.FrameEditorGUI.update_all
def update_all(self, level)
Definition: rqt_editor.py:174
frame_editor.rqt_editor.FrameEditorGUI._update_finished
def _update_finished(self)
Definition: rqt_editor.py:165
qt_gui_py_common::worker_thread
frame_editor.rqt_editor.FrameEditorGUI._update_thread_run
def _update_thread_run(self)
Definition: rqt_editor.py:161
frame_editor.rqt_editor.FrameEditorGUI.btn_set_position_clicked
def btn_set_position_clicked(self, checked)
Definition: rqt_editor.py:592
frame_editor.objects.Frame
Definition: objects.py:24
frame_editor.rqt_editor.FrameEditorGUI.update_tf_list
def update_tf_list(self)
Definition: rqt_editor.py:242
frame_editor.commands.Command_AddElement
Definition: commands.py:33
frame_editor.rqt_editor.FrameEditorGUI.c_valueChanged
def c_valueChanged(self)
Definition: rqt_editor.py:681
frame_editor.rqt_editor.FrameEditorGUI.create_editor
def create_editor(self, context)
Definition: rqt_editor.py:83
frame_editor.rqt_editor.FrameEditorGUI.b_valueChanged
def b_valueChanged(self)
Definition: rqt_editor.py:678
frame_editor.rqt_editor.FrameEditorGUI.update_frame_buffer
def update_frame_buffer(self, animation=False, reset_buffer=True)
Definition: rqt_editor.py:540
frame_editor.rqt_editor.FrameEditorGUI.selected_frame_changed
def selected_frame_changed(self, item, previous)
Definition: rqt_editor.py:459
frame_editor.rqt_editor.FrameEditorGUI.create_main_widget
def create_main_widget(self)
Definition: rqt_editor.py:99
frame_editor.rqt_editor.FrameEditorGUI.file_type
file_type
Definition: rqt_editor.py:69
frame_editor.rqt_editor.FrameEditorGUI.btn_set_c_clicked
def btn_set_c_clicked(self, checked)
Definition: rqt_editor.py:615
frame_editor.rqt_editor.FrameEditorGUI.btn_set_parent_rel_clicked
def btn_set_parent_rel_clicked(self, checked)
PARENTING ##.
Definition: rqt_editor.py:567
frame_editor.constructors_geometry
Definition: constructors_geometry.py:1
frame_editor.rqt_editor.FrameEditorGUI.update_tf_list_search
def update_tf_list_search(self, search_query="")
Definition: rqt_editor.py:191
frame_editor.rqt_editor.FrameEditorGUI.x_valueChanged
def x_valueChanged(self)
Definition: rqt_editor.py:666
frame_editor.rqt_editor.FrameEditorGUI.a_valueChanged
def a_valueChanged(self)
Definition: rqt_editor.py:675
frame_editor.rqt_editor.FrameEditorGUI.btn_set_x_clicked
def btn_set_x_clicked(self, checked)
Definition: rqt_editor.py:600
frame_editor.rqt_editor.FrameEditorGUI.group_valueChanged
def group_valueChanged(self)
Definition: rqt_editor.py:685
frame_editor.rqt_editor.FrameEditorGUI.clear_all
def clear_all(self)
Definition: rqt_editor.py:484
frame_editor.rqt_editor.FrameEditorGUI.btn_set_y_clicked
def btn_set_y_clicked(self, checked)
Definition: rqt_editor.py:603
frame_editor.interface.Interface
Definition: interface.py:5
frame_editor.rqt_editor.FrameEditorGUI.update_fields
def update_fields(self)
Definition: rqt_editor.py:408
frame_editor.commands.Command_ClearAll
Definition: commands.py:84
frame_editor.commands.Command_RemoveElement
Definition: commands.py:52
frame_editor.constructors_geometry.FromTransformStamped
def FromTransformStamped(msg)
TransformStamped ##.
Definition: constructors_geometry.py:57
frame_editor.rqt_editor.FrameEditorGUI.btn_reset_position_rel_clicked
def btn_reset_position_rel_clicked(self, checked)
RESET BUTTONS ##.
Definition: rqt_editor.py:630
frame_editor.rqt_editor.LoadingTreeWidgetItem.progress_bar
progress_bar
Definition: rqt_editor.py:34
frame_editor.editor.FrameEditor
Definition: editor.py:30
frame_editor.rqt_editor.FrameEditorGUI.shutdown_plugin
def shutdown_plugin(self)
PLUGIN ##.
Definition: rqt_editor.py:703
frame_editor.rqt_editor.LoadingTreeWidgetItem.timer
timer
Definition: rqt_editor.py:44
frame_editor.rqt_editor.FrameEditorGUI.btn_reset_position_abs_clicked
def btn_reset_position_abs_clicked(self, checked)
Definition: rqt_editor.py:634
frame_editor.rqt_editor.FrameEditorGUI.btn_duplicate_clicked
def btn_duplicate_clicked(self, checked)
Definition: rqt_editor.py:522
frame_editor.rqt_editor.FrameEditorGUI.get_sleep_time
def get_sleep_time(self)
Definition: rqt_editor.py:536
frame_editor.project_plugin.ProjectPlugin.save_file
def save_file(self, file_name)
Definition: project_plugin.py:191
frame_editor.rqt_editor.FrameEditorGUI.btn_set_z_clicked
def btn_set_z_clicked(self, checked)
Definition: rqt_editor.py:606
frame_editor.rqt_editor.FrameEditorGUI.__init__
def __init__(self, context)
Definition: rqt_editor.py:64


frame_editor
Author(s): ipa-lth , ipa-frn
autogenerated on Thu May 15 2025 02:17:25