execute_step_plan_widget.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 
00005 import std_msgs.msg
00006 import vigir_footstep_planning_msgs.msg
00007 
00008 from rqt_gui_py.plugin import Plugin
00009 from python_qt_binding.QtCore import Qt
00010 from python_qt_binding.QtGui import QWidget, QHBoxLayout, QVBoxLayout, QPushButton, QComboBox
00011 
00012 from vigir_footstep_planning_msgs.msg import StepPlan, ExecuteStepPlanAction, ExecuteStepPlanGoal, ErrorStatus
00013 from vigir_footstep_planning_lib.execute_step_plan_widget import *
00014 from vigir_footstep_planning_lib.error_status_widget import *
00015 from vigir_footstep_planning_lib.logging import *
00016 from vigir_footstep_planning_lib.qt_helper import *
00017 
00018 
00019 class ExecuteStepPlanDialog(Plugin):
00020 
00021     def __init__(self, context):
00022         super(ExecuteStepPlanDialog, self).__init__(context)
00023         self.setObjectName('ExecuteStepPlanDialog')
00024 
00025         self._parent = QWidget()
00026         self._widget = ExecuteStepPlanWidget(self._parent)
00027 
00028         context.add_widget(self._parent)
00029 
00030     def shutdown_plugin(self):
00031         self._widget.shutdown_plugin()
00032 
00033 
00034 class ExecuteStepPlanWidget(QObject):
00035 
00036     execute_step_plan_client = None
00037     step_plan = None
00038 
00039     def __init__(self, context):
00040         super(ExecuteStepPlanWidget, self).__init__()
00041 
00042         # start widget
00043         widget = context
00044         error_status_widget = QErrorStatusWidget()
00045         self.logger = Logger(error_status_widget)
00046 
00047         # add upper part
00048         vbox = QVBoxLayout()
00049 
00050         # add execute action server widget
00051         add_widget_with_frame(vbox, QExecuteStepPlanWidget(logger=self.logger), "Step Plan Selection/Execution:")
00052 
00053         # add error status widget
00054         add_widget_with_frame(vbox, error_status_widget, "Status:")
00055 
00056         # end widget
00057         widget.setLayout(vbox)
00058         #context.add_widget(widget)
00059 
00060     def shutdown_plugin(self):
00061         print "Shutting down ..."
00062         print "Done!"
00063 


vigir_footstep_planning_widgets
Author(s): Alexander Stumpf
autogenerated on Sat Jul 15 2017 02:48:11