src
hironx_ros_bridge
hironx_dashboard.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
3
# Software License Agreement (BSD License)
4
#
5
# Copyright (c) 2015, JSK Lab, University of Tokyo
6
# All rights reserved.
7
#
8
# Redistribution and use in source and binary forms, with or without
9
# modification, are permitted provided that the following conditions
10
# are met:
11
#
12
# * Redistributions of source code must retain the above copyright
13
# notice, this list of conditions and the following disclaimer.
14
# * Redistributions in binary form must reproduce the above
15
# copyright notice, this list of conditions and the following
16
# disclaimer in the documentation and/or other materials provided
17
# with the distribution.
18
# * Neither the name of JSK Lab, University of Tokyo. nor the
19
# names of its contributors may be used to endorse or promote products
20
# derived from this software without specific prior written permission.
21
#
22
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
# POSSIBILITY OF SUCH DAMAGE.
34
35
import
os
36
37
try
:
#14.04
38
from
python_qt_binding.QtGui
import
QMessageBox, QLabel, QPalette
39
except
:
#16.04
40
from
python_qt_binding.QtWidgets
import
(QMessageBox, QLabel)
41
from
python_qt_binding.QtGui
import
QPalette
42
43
from
hrpsys_ros_bridge.hrpsys_dashboard
import
HrpsysDashboard
44
from
rqt_robot_dashboard.widgets
import
MenuDashWidget
45
46
from
hironx_ros_bridge.command_widget
import
HironxoCommandPanel
47
48
49
class
HiroNXNameLabel
(QLabel):
50
def
__init__
(self, name):
51
super(HiroNXNameLabel, self).
__init__
()
52
palette = QPalette()
53
self.setStyleSheet(
'font-size: larger; font-weight: bold; color: #ffffff; background-color: darkgreen;'
)
54
self.setText(name)
55
56
57
class
HiroNXDashboard
(HrpsysDashboard):
58
def
setup
(self, context):
59
super(HiroNXDashboard, self).
setup
(context)
60
self.
name
=
"HiroNX dashboard"
61
self.
_imp_button
=
None
62
self.
_pose_button
=
None
63
self.
_name_label
=
HiroNXNameLabel
(
"HiroNX "
+ os.environ[
"ROS_MASTER_URI"
] +
" "
)
64
self.
_command_panel
=
HironxoCommandPanel
(self, self.context)
65
context.add_widget(self.
_command_panel
)
66
67
def
get_widgets
(self):
68
widgets = super(HiroNXDashboard, self).
get_widgets
()
69
widgets.append([self.
_name_label
])
70
return
widgets
setup
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard._imp_button
_imp_button
Definition:
hironx_dashboard.py:61
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard.get_widgets
def get_widgets(self)
Definition:
hironx_dashboard.py:67
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard
Definition:
hironx_dashboard.py:57
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard.setup
def setup(self, context)
Definition:
hironx_dashboard.py:58
hironx_ros_bridge.command_widget.HironxoCommandPanel
Definition:
command_widget.py:64
hironx_ros_bridge.command_widget
Definition:
command_widget.py:1
hironx_ros_bridge.hironx_dashboard.HiroNXNameLabel
Definition:
hironx_dashboard.py:49
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard.name
name
Definition:
hironx_dashboard.py:60
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard._name_label
_name_label
Definition:
hironx_dashboard.py:63
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard._command_panel
_command_panel
Definition:
hironx_dashboard.py:64
hironx_ros_bridge.hironx_dashboard.HiroNXNameLabel.__init__
def __init__(self, name)
Definition:
hironx_dashboard.py:50
rqt_robot_dashboard::widgets
hironx_ros_bridge.hironx_dashboard.HiroNXDashboard._pose_button
_pose_button
Definition:
hironx_dashboard.py:62
hironx_ros_bridge
Author(s): Kei Okada
, Isaac I.Y. Saito
autogenerated on Mon Feb 28 2022 23:45:15