Ejemplo n.º 1
0
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()
Ejemplo n.º 2
0
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()
Ejemplo n.º 3
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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
0
 def OnInit(self):
     self.tf_interface = TFInterface()
     self.frame = FrameViewerFrame(self.tf_interface)
     self.frame.Show()
     return True