Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 from __future__ import division
00011 import os
00012 import math
00013
00014 from python_qt_binding import loadUi
00015 from python_qt_binding.QtCore import Qt, pyqtSlot
00016 from python_qt_binding.QtGui import QWidget
00017
00018 from qt_gui.plugin import Plugin
00019 import rospkg
00020 import rospy
00021
00022 from rocon_qt_library.widgets import QVideoTeleop
00023
00024
00025
00026
00027
00028
00029 class Teleop(Plugin):
00030 def __init__(self, context):
00031 self._context = context
00032 super(Teleop, self).__init__(context)
00033
00034 self._widget = QVideoTeleop()
00035 if context.serial_number() > 1:
00036 self._widget.setWindowTitle(self._widget.windowTitle() + (' (%d)' % context.serial_number()))
00037 context.add_widget(self._widget)
00038
00039 self._default_cmd_vel_topic = 'cmd_vel'
00040 self._default_compressed_image_topic = 'compressed_image'
00041 self._widget.init_teleop_interface(self._default_cmd_vel_topic, self._default_compressed_image_topic)
00042
00043 def shutdown_plugin(self):
00044 self._widget.shutdown_plugin()