Пример #1
0
import os
import rospy
import rospkg
import tf
import math
import types
import functools

from qt_gui.plugin import Plugin
from python_qt_binding import loadUi
from python_qt_binding.QtCore import Qt, QPointF, QRectF
from python_qt_binding import QT_BINDING_VERSION
from python_qt_binding.QtGui import QPainter, QPen, QColor, QTextOption
from python_qt_binding.QtGui import QMouseEvent
g_PYQT_MAJOR_VERSION = int(QT_BINDING_VERSION.split('.')[0])
if g_PYQT_MAJOR_VERSION == 4:
    from python_qt_binding.QtGui import QWidget
elif g_PYQT_MAJOR_VERSION == 5:
    from python_qt_binding.QtWidgets import QWidget

from nav_msgs.msg import Odometry
from std_msgs.msg import UInt16MultiArray as UIntArray
from std_msgs.msg import String
from geometry_msgs.msg import PoseStamped, TwistStamped
from geometry_msgs.msg import Point
from consai_msgs.msg import GeometryFieldSize, FieldLineSegment, FieldCircularArc
from consai_msgs.msg import ReplaceBall, ReplaceRobot
from aisaac.msg import Status

from geometry import Geometry
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# System imports
from python_qt_binding import QT_BINDING_VERSION
if float(QT_BINDING_VERSION.split(".")[0]) < 5:
    # for retrocompatibility
    from python_qt_binding.QtGui import QVBoxLayout, QWidget
else:
    # for compatibility with pyqt5 or higher
    from python_qt_binding.QtWidgets import QVBoxLayout, QWidget

from qt_gui.plugin import Plugin
from qt_gui_py_common.simple_settings_dialog import SimpleSettingsDialog

# Local imports
#from .utils import _build_common_widget
from .dg_button import DynamicGraphButton
from .py_console_widget import PyConsoleWidget
try:
    from .spyder_console_widget import SpyderConsoleWidget