Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
rqt_py_trees.behaviour_tree.RosBehaviourTree Class Reference
Inheritance diagram for rqt_py_trees.behaviour_tree.RosBehaviourTree:
Inheritance graph
[legend]

Classes

class  ComboBoxEventFilter
 

Public Member Functions

def __init__ (self, context)
 
def get_current_message (self)
 
def message_changed (self)
 
def message_cleared (self)
 
def no_right_click_press_event (self, func)
 
def open_latest_bag (self, bag_dir, by_time=False)
 
def restore_settings (self, plugin_settings, instance_settings)
 
def save_settings (self, plugin_settings, instance_settings)
 
def timeline_changed (self)
 

Static Public Member Functions

def add_arguments (parser, group=True)
 

Public Attributes

 behaviour_sub
 
 context
 
 current_topic
 
 dot_to_qt
 
 dotcode_factory
 
 dotcode_generator
 
 initialized
 
 live_update
 
 message_list
 
 visibility_level
 

Static Public Attributes

string no_roscore_switch = "--no-roscore"
 

Private Member Functions

def _choose_topic (self, index)
 
def _first (self)
 
def _fit_in_view (self)
 
def _generate_dotcode (self, message)
 
def _last (self)
 
def _load_bag (self, file_name=None)
 
def _load_dot (self, file_name=None)
 
def _next (self)
 
def _play (self)
 
def _previous (self)
 
def _redraw_graph_view (self)
 
def _refresh_tree_graph (self)
 
def _resize_event (self, event)
 
def _save_dot (self)
 
def _save_image (self)
 
def _save_svg (self)
 
def _set_bag_timeline (self, bag)
 
def _set_dynamic_timeline (self)
 
def _set_timeline_buttons (self, first_snapshot=None, previous_snapshot=None, next_snapshot=None, last_snapshot=None)
 
def _stop (self)
 
def _timer_next (self, timer)
 
def _update_combo_topics (self)
 
def _update_graph_view (self, dotcode)
 
def _update_visibility_level (self, visibility_level)
 

Private Attributes

 _browsing_timeline
 
 _combo_event_filter
 
 _current_dotcode
 
 _dotcode_cache
 
 _dotcode_cache_capacity
 
 _dotcode_cache_keys
 
 _force_refresh
 
 _new_messages
 
 _play_timer
 
 _saved_settings_topic
 
 _scene
 
 _scene_cache
 
 _scene_cache_capacity
 
 _scene_cache_keys
 
 _timeline
 
 _timeline_listener
 
 _tip_message
 Get the tip, from the perspective of the root. More...
 
 _viewing_bag
 
 _widget
 

Static Private Attributes

 _deferred_fit_in_view = Signal()
 
string _empty_topic = "No valid topics available"
 
 _expected_type = py_trees_msgs.BehaviourTree()._type
 
 _message_changed = Signal()
 
 _message_cleared = Signal()
 
 _refresh_combo = Signal()
 
 _refresh_view = Signal()
 
string _unselected_topic = "Not subscribing"
 

Detailed Description

Definition at line 74 of file behaviour_tree.py.

Constructor & Destructor Documentation

def rqt_py_trees.behaviour_tree.RosBehaviourTree.__init__ (   self,
  context 
)

Definition at line 104 of file behaviour_tree.py.

Member Function Documentation

def rqt_py_trees.behaviour_tree.RosBehaviourTree._choose_topic (   self,
  index 
)
private
Updates the topic that is subscribed to based on changes to the combo box
text. If the topic is unchanged, nothing will happnen. Otherwise, the
old subscriber will be unregistered, and a new one initialised for the
updated topic. If the selected topic corresponds to the unselected
topic, the subscriber will be unregistered and a new one will not be
created.

Definition at line 368 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._first (   self)
private
Navigate to the first message. Activates the next and last buttons, disables
first and previous, and refreshes the view. Also changes the state to be
browsing the timeline.

Definition at line 458 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._fit_in_view (   self)
private

Definition at line 865 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._generate_dotcode (   self,
  message 
)
private
Get the dotcode for the given message, checking the cache for dotcode that
was previously generated, and adding to the cache if it wasn't there.
Cache replaces LRU.

Mostly stolen from rqt_bag.MessageLoaderThread

:param py_trees_msgs.BehavoiurTree message

Definition at line 564 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._last (   self)
private
Navigate to the last message. Activates the first and previous buttons,
disables next and last, and refreshes the view. The user is no longer
browsing the timeline after this is called.

Definition at line 491 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._load_bag (   self,
  file_name = None 
)
private
Load a bag from file. If no file name is given, a dialogue will pop up and
the user will be asked to select a file. If the bag file selected
doesn't have any valid topic, nothing will happen. If there are valid
topics, we load the bag and add a timeline for managing it.

Definition at line 803 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._load_dot (   self,
  file_name = None 
)
private

Definition at line 847 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._next (   self)
private
Navigate to the next message. Activates the first and previous buttons. If
the current message is the second from last, disables the next and last
buttons, and stops browsing the timeline.

Definition at line 504 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._play (   self)
private
Start a timer which will automatically call the next function every time its
duration is up. Only works if the current message is not the final one.

Definition at line 436 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._previous (   self)
private
Navigate to the previous message. Activates the next and last buttons, and
refreshes the view. If the current message is the second message, then
the first and previous buttons are disabled. Changes the state to be
browsing the timeline.

Definition at line 470 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._redraw_graph_view (   self)
private

Definition at line 634 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._refresh_tree_graph (   self)
private
Refresh the graph view by regenerating the dotcode from the current message.

Definition at line 556 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._resize_event (   self,
  event 
)
private
Activated when the window is resized. Will re-fit the behaviour tree in the
window, and update the size of the timeline scene rectangle so that it
is correctly drawn.

Definition at line 679 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._save_dot (   self)
private

Definition at line 869 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._save_image (   self)
private

Definition at line 902 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._save_svg (   self)
private

Definition at line 884 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._set_bag_timeline (   self,
  bag 
)
private
Set the timeline of this object to a bag timeline, hooking the graphics view
into mouse and wheel functions of the timeline.

Definition at line 772 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._set_dynamic_timeline (   self)
private
Set the timeline to a dynamic timeline, listening to messages on the topic
selected in the combo box.

Definition at line 738 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._set_timeline_buttons (   self,
  first_snapshot = None,
  previous_snapshot = None,
  next_snapshot = None,
  last_snapshot = None 
)
private
Allows timeline buttons to be enabled and disabled.

Definition at line 423 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._stop (   self)
private
Stop the play timer, if it exists.

Definition at line 451 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._timer_next (   self,
  timer 
)
private
Helper function for the timer so that it can call the next function without
breaking.

Definition at line 444 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._update_combo_topics (   self)
private
Update the topics displayed in the combo box that the user can use to select
which topic they want to listen on for trees, filtered so that only
topics with the correct message type are shown.

Definition at line 389 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._update_graph_view (   self,
  dotcode 
)
private

Definition at line 628 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree._update_visibility_level (   self,
  visibility_level 
)
private
We match the combobox index to the visibility levels defined in py_trees.common.VisibilityLevel.

Definition at line 286 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.add_arguments (   parser,
  group = True 
)
static
Allows for the addition of arguments to the rqt_gui loading method

:param bool group: If set to false, this indicates that the function is
    being called from the rqt_py_trees script as opposed to the inside
    of rqt_gui.main. We use this to ensure that the same arguments can
    be passed with and without the --no-roscore argument set. If it is
    set, the rqt_gui code is bypassed. We need to make sure that all the
    arguments are displayed with -h.

Definition at line 294 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.get_current_message (   self)
Get the message in the list or bag that is being viewed that should be
displayed.

Definition at line 354 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.message_changed (   self)
This function should be called when the message being viewed changes. Will
change the current message and update the view. Also ensures that the
timeline buttons are correctly set for the current position of the
playhead on the timeline.

Definition at line 701 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.message_cleared (   self)
This function should be called when the message being viewed was cleared.
Currently no situation where this happens?

Definition at line 720 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.no_right_click_press_event (   self,
  func 
)
Decorator for ignoring right click events on mouse press

Definition at line 727 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.open_latest_bag (   self,
  bag_dir,
  by_time = False 
)
Open the latest bag in the given directory

:param str bag_dir: the directory in which to look for bags
:param bool by_time: if true, the latest bag is the one with the latest
    modification time, not the latest date-time specified by its filename

Definition at line 315 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.restore_settings (   self,
  plugin_settings,
  instance_settings 
)

Definition at line 536 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.save_settings (   self,
  plugin_settings,
  instance_settings 
)

Definition at line 526 of file behaviour_tree.py.

def rqt_py_trees.behaviour_tree.RosBehaviourTree.timeline_changed (   self)
Should be called whenever the timeline changes. At the moment this is only
used to ensure that the first and previous buttons are correctly
disabled when a new message coming in on the timeline pushes the
playhead to be at the first message

Definition at line 689 of file behaviour_tree.py.

Member Data Documentation

rqt_py_trees.behaviour_tree.RosBehaviourTree._browsing_timeline
private

Definition at line 128 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._combo_event_filter
private

Definition at line 195 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._current_dotcode
private

Definition at line 124 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._deferred_fit_in_view = Signal()
staticprivate

Definition at line 76 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._dotcode_cache
private

Definition at line 244 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._dotcode_cache_capacity
private

Definition at line 243 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._dotcode_cache_keys
private

Definition at line 248 of file behaviour_tree.py.

string rqt_py_trees.behaviour_tree.RosBehaviourTree._empty_topic = "No valid topics available"
staticprivate

Definition at line 82 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._expected_type = py_trees_msgs.BehaviourTree()._type
staticprivate

Definition at line 81 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._force_refresh
private

Definition at line 269 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._message_changed = Signal()
staticprivate

Definition at line 79 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._message_cleared = Signal()
staticprivate

Definition at line 80 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._new_messages
private

Definition at line 502 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._play_timer
private

Definition at line 264 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._refresh_combo = Signal()
staticprivate

Definition at line 78 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._refresh_view = Signal()
staticprivate

Definition at line 77 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._saved_settings_topic
private

Definition at line 140 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._scene
private

Definition at line 153 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._scene_cache
private

Definition at line 252 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._scene_cache_capacity
private

Definition at line 251 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._scene_cache_keys
private

Definition at line 253 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._timeline
private

Definition at line 182 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._timeline_listener
private

Definition at line 183 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._tip_message
private

Get the tip, from the perspective of the root.

this is pretty inefficient, and ignores caching

Definition at line 139 of file behaviour_tree.py.

string rqt_py_trees.behaviour_tree.RosBehaviourTree._unselected_topic = "Not subscribing"
staticprivate

Definition at line 83 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._viewing_bag
private

Definition at line 125 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree._widget
private

Definition at line 130 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.behaviour_sub

Definition at line 138 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.context

Definition at line 122 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.current_topic

Definition at line 137 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.dot_to_qt

Definition at line 144 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.dotcode_factory

Definition at line 133 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.dotcode_generator

Definition at line 136 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.initialized

Definition at line 123 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.live_update

Definition at line 115 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.message_list

Definition at line 836 of file behaviour_tree.py.

string rqt_py_trees.behaviour_tree.RosBehaviourTree.no_roscore_switch = "--no-roscore"
static

Definition at line 84 of file behaviour_tree.py.

rqt_py_trees.behaviour_tree.RosBehaviourTree.visibility_level

Definition at line 141 of file behaviour_tree.py.


The documentation for this class was generated from the following file:


rqt_py_trees
Author(s): Thibault Kruse, Michal Staniaszek, Daniel Stonier, Naveed Usmani
autogenerated on Mon Jun 10 2019 14:55:56