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
00013
00014 from qt_gui.plugin import Plugin
00015 import rocon_qt_library.utils as utils
00016
00017
00018 from rocon_console import console
00019 from rocon_remocon.interactive_client_ui import InteractiveClientUI
00020
00021
00022
00023
00024
00025
00026 class RqtRemocon(Plugin):
00027
00028 def __init__(self, context):
00029 self._context = context
00030 super(RqtRemocon, self).__init__(context)
00031
00032 self.rocon_master_uri = 'localhost'
00033 self.host_name = 'localhost'
00034
00035 try:
00036 self.rocon_master_uri = os.environ["ROS_MASTER_URI"]
00037 self.host_name = os.environ["ROS_HOSTNAME"]
00038 except KeyError as e:
00039 console.logerror("Rqt Remocon: %s " % str(e))
00040
00041 self.setObjectName('Rqt Remocon')
00042 self._rqt_remocon = InteractiveClientUI(None, "Rqt remocon", None, self.rocon_master_uri, self.host_name, True)
00043 context.add_widget(self._rqt_remocon.get_main_ui_handle())
00044
00045 def shutdown_plugin(self):
00046 self._rqt_remocon.shutdown()