class FrameViewerView(TopicMessageView):
    name = 'Frame Viewer'

    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_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_cleared(self):
        TopicMessageView.message_cleared(self)

        self.tf_interface.buffer.clear()
class FrameViewerView(TopicMessageView):
    name = 'Frame Viewer'

    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_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_cleared(self):
        TopicMessageView.message_cleared(self)

        self.tf_interface.buffer.clear()
    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)
Exemple #5
0
 def OnInit(self):
     self.tf_interface = TFInterface()
     self.frame = FrameViewerFrame(self.tf_interface)
     self.frame.Show()
     return True