def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)
        
        if msg_details:
            topic, msg, t = msg_details

            wx.CallAfter(self.monitor_panel.new_message, msg)
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)

        if msg_details:
            topic, msg, t = msg_details

            wx.CallAfter(self.monitor_panel.new_message, msg)
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)
        
        self._image_lock  = threading.RLock()
        self._image       = None
        self._image_topic = None
        self._image_stamp = None

        self._image_surface = None

        self._overlay_font_size = 14.0
        self._overlay_indent    = (4, 4)
        self._overlay_color     = (0.2, 0.2, 1.0)

        self._size_set = False
        
        self._next_frame_num = 1
        
        tb = self.parent.GetToolBar()
        icons_dir = roslib.packages.get_pkg_dir(PKG) + '/icons/'
        tb.AddSeparator()

        self.save_frame_tool           = tb.AddLabelTool(wx.ID_ANY, '',              wx.Bitmap(icons_dir + 'picture_save.png'),  shortHelp='Save frame',    longHelp='Save frame using filename spec')
        self.file_spec_tool            = wx.TextCtrl(tb, wx.ID_ANY, 'frame%04d.png', size=(200, 22))
        tb.AddControl(self.file_spec_tool)
        self.save_selected_frames_tool = tb.AddLabelTool(wx.ID_ANY, '',              wx.Bitmap(icons_dir + 'pictures_save.png'), shortHelp='Save frames',   longHelp='Save frames from selected region')

        tb.Bind(wx.EVT_TOOL, lambda e: self.save_frame(),           self.save_frame_tool)
        tb.Bind(wx.EVT_TOOL, lambda e: self.save_selected_frames(), self.save_selected_frames_tool)
        
        self.parent.Bind(wx.EVT_SIZE,       self.on_size)
        self.parent.Bind(wx.EVT_PAINT,      self.on_paint)
        self.parent.Bind(wx.EVT_RIGHT_DOWN, self.on_right_down)
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)

        if msg_details:
            topic, msg, t = msg_details

            self.monitor_panel.add_rxbag_msg(msg, t)
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)

        topic, msg, t = msg_details

        if not self._data_loader:
            self._topic = topic
            self.start_loading()

        self._message = msg

        self.playhead = (t - self.timeline.start_stamp).to_sec()
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)

        topic, _, t = msg_details[:3]

        tf_entries = list(self.timeline.get_entries_with_bags(topic, t - self.buffer_length, t))
        self.tf_interface.buffer.clear()
        for bag, entry in tf_entries:
            _, msg, msg_stamp = self.timeline.read_message(bag, entry.position)
            for transform in msg.transforms:
                self.tf_interface.buffer.set_transform(transform, '')
        self.tf_interface.set_data_timestamp(t.to_sec())
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)
        
        topic, msg, t = msg_details[:3]

        if not msg:
            self.set_image(None, topic, stamp)
        else:
            self.set_image(msg, topic, msg.header.stamp)
    
            if not self._size_set:
                self._size_set = True
                wx.CallAfter(self.reset_size)
    def message_viewed(self, bag, msg_details):
        TopicMessageView.message_viewed(self, bag, msg_details)

        topic, _, t = msg_details[:3]

        tf_entries = list(
            self.timeline.get_entries_with_bags(topic, t - self.buffer_length,
                                                t))
        self.tf_interface.buffer.clear()
        for bag, entry in tf_entries:
            _, msg, msg_stamp = self.timeline.read_message(bag, entry.position)
            for transform in msg.transforms:
                self.tf_interface.buffer.set_transform(transform, '')
        self.tf_interface.set_data_timestamp(t.to_sec())
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)

        self._topic = None
        self._message = None
        self._plot_paths = []
        self._playhead = None
        self._chart = Chart()
        self._data_loader = None
        self._x_view = None
        self._dirty_count = 0
        self._csv_data_loader = None
        self._csv_path = None
        self._csv_row_stride = None

        self._clicked_pos = None
        self._dragged_pos = None

        self._configure_frame = None

        self._max_interval_pixels = 1.0

        tb = self.parent.ToolBar
        icons_dir = roslib.packages.get_pkg_dir(PKG) + "/icons/"
        tb.AddSeparator()
        tb.Bind(
            wx.EVT_TOOL, lambda e: self.configure(), tb.AddLabelTool(wx.ID_ANY, "", wx.Bitmap(icons_dir + "cog.png"))
        )

        self.parent.Bind(wx.EVT_SIZE, self._on_size)
        self.parent.Bind(wx.EVT_PAINT, self._on_paint)
        self.parent.Bind(wx.EVT_LEFT_DOWN, self._on_left_down)
        self.parent.Bind(wx.EVT_MIDDLE_DOWN, self._on_middle_down)
        self.parent.Bind(wx.EVT_RIGHT_DOWN, self._on_right_down)
        self.parent.Bind(wx.EVT_LEFT_UP, self._on_left_up)
        self.parent.Bind(wx.EVT_MIDDLE_UP, self._on_middle_up)
        self.parent.Bind(wx.EVT_RIGHT_UP, self._on_right_up)
        self.parent.Bind(wx.EVT_MOTION, self._on_mouse_move)
        self.parent.Bind(wx.EVT_MOUSEWHEEL, self._on_mousewheel)
        self.parent.Bind(wx.EVT_CLOSE, self._on_close)

        wx.CallAfter(self.configure)
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)

        self.monitor_panel = monitor_panel.MonitorPanel(self.parent,
                                                        rxbag=True)
        self.monitor_panel.SetPosition((1, 0))
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)

        self.monitor_panel = robot_monitor_panel.RobotMonitorPanel(self.parent, rxbag=True)
        self.monitor_panel.SetPosition((1, 0))
    def message_cleared(self):
        TopicMessageView.message_cleared(self)

        self.tf_interface.buffer.clear()
    def message_cleared(self):
        TopicMessageView.message_cleared(self)

        self.set_image(None, None, None)
 def message_cleared(self):
     TopicMessageView.message_cleared(self)
     
     wx.CallAfter(self.monitor_panel.reset_monitor)
 def message_cleared(self):
     self._message = None
     
     TopicMessageView.message_cleared(self)
     
     wx.CallAfter(self.parent.Refresh)
Exemple #16
0
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)

        self.tf_interface  = TFInterface(use_listener=False)
        self.viewer        = FrameViewerPanel(self.parent, self.tf_interface, False)
        self.buffer_length = roslib.rostime.Duration(10.0)
    def __init__(self, timeline, parent):
        TopicMessageView.__init__(self, timeline, parent)

        self.tf_interface = TFInterface(use_listener=False)
        self.viewer = FrameViewerPanel(self.parent, self.tf_interface, False)
        self.buffer_length = roslib.rostime.Duration(10.0)
    def message_cleared(self):
        TopicMessageView.message_cleared(self)

        wx.CallAfter(self.monitor_panel.reset_monitor)
Exemple #19
0
    def message_cleared(self):
        TopicMessageView.message_cleared(self)

        self.tf_interface.buffer.clear()