diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro index dba7e18673861d78224996dd92f6b51e785c3802..69b605354323c0c3aed13772053086e1c19a98be 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro @@ -27,7 +27,8 @@ SOURCES += src/main.cpp\ src/coordinatorrow.cpp \ src/studentcontrollertab.cpp \ src/defaultcontrollertab.cpp \ - src/pickercontrollertab.cpp + src/pickercontrollertab.cpp \ + src/tuningcontrollertab.cpp HEADERS += include/mainwindow.h \ include/topbanner.h \ @@ -40,8 +41,10 @@ HEADERS += include/mainwindow.h \ include/studentcontrollertab.h \ include/defaultcontrollertab.h \ include/pickercontrollertab.h \ + include/tuningcontrollertab.h \ include/Constants_for_Qt_compile.h + FORMS += forms/mainwindow.ui \ forms/topbanner.ui \ forms/connectstartstopbar.ui \ @@ -52,7 +55,8 @@ FORMS += forms/mainwindow.ui \ forms/coordinatorrow.ui \ forms/studentcontrollertab.ui \ forms/defaultcontrollertab.ui \ - forms/pickercontrollertab.ui + forms/pickercontrollertab.ui \ + forms/tuningcontrollertab.ui RESOURCES += \ flyingagentgui.qrc diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/controllertabs.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/controllertabs.ui index 928aa1152368f7fff3dd07d784130df8f2be273f..75157907ea4645a83050ec0241e4a760d168dee8 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/controllertabs.ui +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/controllertabs.ui @@ -28,7 +28,7 @@ <item row="0" column="0"> <widget class="QTabWidget" name="controller_tabs_widget"> <property name="currentIndex"> - <number>0</number> + <number>3</number> </property> <property name="movable"> <bool>true</bool> @@ -63,13 +63,23 @@ </item> </layout> </widget> + <widget class="QWidget" name="tuning_tab"> + <attribute name="title"> + <string>Tuning</string> + </attribute> + <layout class="QGridLayout" name="gridLayout_6"> + <item row="0" column="0"> + <widget class="TuningControllerTab" name="tuning_controller_tab_widget" native="true"/> + </item> + </layout> + </widget> <widget class="QWidget" name="safe_tab"> <attribute name="title"> <string>Safe</string> </attribute> <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0"> - <widget class="SafeControllerTab" name="widget_2" native="true"/> + <widget class="SafeControllerTab" name="safe_controller_tab_widget" native="true"/> </item> </layout> </widget> @@ -102,6 +112,12 @@ <header>pickercontrollertab.h</header> <container>1</container> </customwidget> + <customwidget> + <class>TuningControllerTab</class> + <extends>QWidget</extends> + <header>tuningcontrollertab.h</header> + <container>1</container> + </customwidget> </customwidgets> <resources/> <connections/> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui index 4201e18dfafc2dd5da93b36cc0d2c2903f87f912..b11f354ff419afaed713d41f3c2ca50627b451e1 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui @@ -30,8 +30,8 @@ <property name="spacing"> <number>12</number> </property> - <item row="0" column="4"> - <widget class="QPushButton" name="enable_safe_button"> + <item row="0" column="2"> + <widget class="QPushButton" name="enable_student_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -57,12 +57,12 @@ </font> </property> <property name="text"> - <string>Safe</string> + <string>Student</string> </property> </widget> </item> - <item row="0" column="0"> - <widget class="QLabel" name="enable_controller_label"> + <item row="1" column="0"> + <widget class="QLabel" name="load_yaml_label"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -88,15 +88,28 @@ </font> </property> <property name="text"> - <string>Enable</string> + <string>Load YAML</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> - <item row="0" column="1"> - <widget class="QPushButton" name="enable_default_button"> + <item row="0" column="6"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="5"> + <widget class="QPushButton" name="enable_safe_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -122,46 +135,37 @@ </font> </property> <property name="text"> - <string>Default</string> + <string>Safe</string> </property> </widget> </item> - <item row="1" column="0"> - <widget class="QLabel" name="load_yaml_label"> + <item row="1" column="3"> + <widget class="QPushButton" name="load_yaml_picker_button"> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> - <width>0</width> + <width>60</width> <height>50</height> </size> </property> <property name="maximumSize"> <size> - <width>16777215</width> + <width>180</width> <height>50</height> </size> </property> - <property name="font"> - <font> - <weight>75</weight> - <bold>true</bold> - </font> - </property> <property name="text"> - <string>Load YAML</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> + <string>Picker</string> </property> </widget> </item> - <item row="1" column="4"> - <widget class="QPushButton" name="load_yaml_safe_button"> + <item row="1" column="2"> + <widget class="QPushButton" name="load_yaml_student_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -181,12 +185,12 @@ </size> </property> <property name="text"> - <string>Safe</string> + <string>Student</string> </property> </widget> </item> - <item row="1" column="1"> - <widget class="QPushButton" name="load_yaml_default_button"> + <item row="0" column="1"> + <widget class="QPushButton" name="enable_default_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -205,13 +209,53 @@ <height>50</height> </size> </property> + <property name="font"> + <font> + <weight>50</weight> + <bold>false</bold> + </font> + </property> <property name="text"> <string>Default</string> </property> </widget> </item> - <item row="1" column="2"> - <widget class="QPushButton" name="load_yaml_student_button"> + <item row="0" column="0"> + <widget class="QLabel" name="enable_controller_label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>50</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>50</height> + </size> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Enable</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="1" column="5"> + <widget class="QPushButton" name="load_yaml_safe_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -231,12 +275,12 @@ </size> </property> <property name="text"> - <string>Student</string> + <string>Safe</string> </property> </widget> </item> - <item row="0" column="2"> - <widget class="QPushButton" name="enable_student_button"> + <item row="1" column="1"> + <widget class="QPushButton" name="load_yaml_default_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -255,14 +299,8 @@ <height>50</height> </size> </property> - <property name="font"> - <font> - <weight>50</weight> - <bold>false</bold> - </font> - </property> <property name="text"> - <string>Student</string> + <string>Default</string> </property> </widget> </item> @@ -297,8 +335,8 @@ </property> </widget> </item> - <item row="1" column="3"> - <widget class="QPushButton" name="load_yaml_picker_button"> + <item row="0" column="4"> + <widget class="QPushButton" name="enable_tuning_button"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> <horstretch>0</horstretch> @@ -318,22 +356,34 @@ </size> </property> <property name="text"> - <string>Picker</string> + <string>Tuning</string> </property> </widget> </item> - <item row="0" column="5"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <item row="1" column="4"> + <widget class="QPushButton" name="load_yaml_tuning_button"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="sizeHint" stdset="0"> + <property name="minimumSize"> <size> - <width>40</width> - <height>20</height> + <width>60</width> + <height>50</height> </size> </property> - </spacer> + <property name="maximumSize"> + <size> + <width>180</width> + <height>50</height> + </size> + </property> + <property name="text"> + <string>Tuning</string> + </property> + </widget> </item> </layout> </item> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui index 90eb9f736660c627283b838825e1643707608f5c..2a7f180b21fb15a87ae9950dc0e0359f5e3c35cf 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui @@ -213,6 +213,7 @@ <addaction name="action_showHideController_default"/> <addaction name="action_showHideController_student"/> <addaction name="action_showHideController_picker"/> + <addaction name="action_showHideController_tuning"/> <addaction name="action_showHideController_safe"/> </widget> <addaction name="menuFile"/> @@ -290,6 +291,17 @@ <string>Safe</string> </property> </action> + <action name="action_showHideController_tuning"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="text"> + <string>Tuning</string> + </property> + </action> </widget> <layoutdefault spacing="6" margin="11"/> <customwidgets> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/studentcontrollertab.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/studentcontrollertab.ui index 98d17bfed9a207d28cca90e8f1c5b68e19232f28..c1df7fef3ff18ce65ae38879c1396e660eb7383f 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/studentcontrollertab.ui +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/studentcontrollertab.ui @@ -88,6 +88,9 @@ <height>60</height> </size> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="0" column="2"> @@ -174,6 +177,9 @@ <height>60</height> </size> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="1" column="2"> @@ -190,6 +196,9 @@ <height>60</height> </size> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="1" column="3"> @@ -206,6 +215,9 @@ <height>60</height> </size> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="1" column="4"> @@ -222,6 +234,9 @@ <height>60</height> </size> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> </layout> @@ -278,6 +293,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -438,6 +456,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item> @@ -493,6 +514,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -520,6 +544,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -563,6 +590,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -590,6 +620,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -617,6 +650,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -644,6 +680,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -784,6 +823,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -811,6 +853,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -838,6 +883,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -881,6 +929,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -908,6 +959,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -935,6 +989,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -962,6 +1019,9 @@ <property name="text"> <string>xx.xx</string> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -1002,6 +1062,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="7" column="4"> @@ -1042,6 +1105,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="5" column="4"> @@ -1063,6 +1129,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="3" column="4"> @@ -1084,6 +1153,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item row="1" column="6"> @@ -1136,6 +1208,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item> @@ -1199,6 +1274,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item> @@ -1262,6 +1340,9 @@ <family>Courier</family> </font> </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> </widget> </item> <item> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/tuningcontrollertab.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/tuningcontrollertab.ui new file mode 100644 index 0000000000000000000000000000000000000000..72ae921f3c38b846aac809261e734ff8ec10ae61 --- /dev/null +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/tuningcontrollertab.ui @@ -0,0 +1,703 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>TuningControllerTab</class> + <widget class="QWidget" name="TuningControllerTab"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1503</width> + <height>814</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>16</pointsize> + </font> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <layout class="QGridLayout" name="gridLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item row="0" column="0"> + <layout class="QGridLayout" name="gridLayout_3"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item row="0" column="9"> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_13"> + <property name="text"> + <string>velocity</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_14"> + <property name="text"> + <string>[meters/second]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_7"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="0" column="2"> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string>gain</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="9"> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <family>Courier</family> + </font> + </property> + <property name="text"> + <string>xx.xx</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>angle</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>[degrees]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="2" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <family>Courier</family> + </font> + </property> + <property name="text"> + <string>xx.xx</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="7"> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string>gain</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <family>Courier</family> + </font> + </property> + <property name="text"> + <string>xx.xx</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="5"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label_9"> + <property name="text"> + <string>position</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_10"> + <property name="text"> + <string>error</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_11"> + <property name="text"> + <string>[meters]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_4"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="0" column="8"> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string>x</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="3" column="2"> + <widget class="QSlider" name="horizontalSlider"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="0" column="6"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_12"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>+</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="1"> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string>=</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <family>Courier</family> + </font> + </property> + <property name="text"> + <string>xx.xx</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>x</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="5"> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>180</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <family>Courier</family> + </font> + </property> + <property name="text"> + <string>xx.xx</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0"> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="Line" name="line_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="3"> + <widget class="Line" name="line_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="5"> + <widget class="Line" name="line_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="9"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <widget class="Line" name="line_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="6"> + <widget class="Line" name="line_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="7"> + <widget class="Line" name="line_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="1" column="8"> + <widget class="Line" name="line_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>x</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="6"> + <layout class="QHBoxLayout" name="horizontalLayout_11"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_15"> + <property name="text"> + <string>+</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="8"> + <layout class="QHBoxLayout" name="horizontalLayout_12"> + <property name="leftMargin"> + <number>12</number> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <widget class="QLabel" name="label_16"> + <property name="text"> + <string>x</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item row="1" column="0"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/controllertabs.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/controllertabs.h index 7650f45f1f19e7a2894e1e735b6d8d76b7e01d4f..c159378e6da8e2852e69aa44f3f238921333f3d8 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/controllertabs.h +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/controllertabs.h @@ -50,6 +50,7 @@ public: void showHideController_default_changed(); void showHideController_student_changed(); void showHideController_picker_changed(); + void showHideController_tuning_changed(); void showHideController_safe_changed(); diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h index 53139bfe398d2b1ca6107c268d7e3567cb06ca53..1f81bf8e3de0ceb23e46183d6f10eb1192b5d1c5 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h @@ -64,6 +64,7 @@ public: void showHideController_default_changed(); void showHideController_student_changed(); void showHideController_picker_changed(); + void showHideController_tuning_changed(); void showHideController_safe_changed(); @@ -75,12 +76,14 @@ private slots: // ENABLE CONTROLLER BUTTONS ON-CLICK CALLBACK void on_enable_safe_button_clicked(); + void on_enable_tuning_button_clicked(); void on_enable_picker_button_clicked(); void on_enable_student_button_clicked(); void on_enable_default_button_clicked(); // LOAD YAML BUTTONS ON-CLICK CALLBACK void on_load_yaml_safe_button_clicked(); + void on_load_yaml_tuning_button_clicked(); void on_load_yaml_picker_button_clicked(); void on_load_yaml_student_button_clicked(); void on_load_yaml_default_button_clicked(); diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h index d456f45d9d9ed61897378e7293822dbe54ee2688..91e68c96c79984b4b79124f55ddb19d76f949129 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h @@ -127,6 +127,7 @@ private slots: void on_action_showHideController_default_changed(); void on_action_showHideController_student_changed(); void on_action_showHideController_picker_changed(); + void on_action_showHideController_tuning_changed(); void on_action_showHideController_safe_changed(); }; diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/tuningcontrollertab.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/tuningcontrollertab.h new file mode 100644 index 0000000000000000000000000000000000000000..2d4eaf3d6194d612c6fe5cbef2a66016813a5362 --- /dev/null +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/tuningcontrollertab.h @@ -0,0 +1,22 @@ +#ifndef TUNINGCONTROLLERTAB_H +#define TUNINGCONTROLLERTAB_H + +#include <QWidget> + +namespace Ui { +class TuningControllerTab; +} + +class TuningControllerTab : public QWidget +{ + Q_OBJECT + +public: + explicit TuningControllerTab(QWidget *parent = 0); + ~TuningControllerTab(); + +private: + Ui::TuningControllerTab *ui; +}; + +#endif // TUNINGCONTROLLERTAB_H diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/controllertabs.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/controllertabs.cpp index 7f58a1c94d0bbc0610e0c04e507c15627403272f..9b1127895f60bbb01f91b78ee01434c53f58584c 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/controllertabs.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/controllertabs.cpp @@ -164,6 +164,11 @@ void ControllerTabs::showHideController_picker_changed() showHideController_toggle("Picker",ui->picker_tab); } +void ControllerTabs::showHideController_tuning_changed() +{ + showHideController_toggle("Tuning",ui->tuning_tab); +} + void ControllerTabs::showHideController_safe_changed() { showHideController_toggle("Safe",ui->safe_tab); @@ -302,7 +307,7 @@ void ControllerTabs::setControllerEnabled(int new_controller) } case TUNING_CONTROLLER: { - //ui->controller_enabled_label->setText("Tuning"); + setTextColourOfTabLabel( m_tab_text_colour_highlight , ui->tuning_tab ); break; } case PICKER_CONTROLLER: @@ -324,6 +329,7 @@ void ControllerTabs::setAllTabLabelsToNormalColouring() setTextColourOfTabLabel( m_tab_text_colour_normal , ui->default_tab ); setTextColourOfTabLabel( m_tab_text_colour_normal , ui->student_tab ); setTextColourOfTabLabel( m_tab_text_colour_normal , ui->picker_tab ); + setTextColourOfTabLabel( m_tab_text_colour_normal , ui->tuning_tab ); setTextColourOfTabLabel( m_tab_text_colour_normal , ui->safe_tab ); } diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/enablecontrollerloadyamlbar.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/enablecontrollerloadyamlbar.cpp index ca509b8f85fd83cc19b729702d22147e440eb81f..e3afc90f59fda82311f83264873af37f421f92e2 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/enablecontrollerloadyamlbar.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/enablecontrollerloadyamlbar.cpp @@ -61,10 +61,16 @@ void EnableControllerLoadYamlBar::showHideController_student_changed() void EnableControllerLoadYamlBar::showHideController_picker_changed() { - ui->enable_picker_button ->setHidden( !(ui->enable_picker_button->isHidden()) ); + ui->enable_picker_button ->setHidden( !(ui->enable_picker_button->isHidden()) ); ui->load_yaml_picker_button->setHidden( !(ui->load_yaml_picker_button->isHidden()) ); } +void EnableControllerLoadYamlBar::showHideController_tuning_changed() +{ + ui->enable_tuning_button ->setHidden( !(ui->enable_tuning_button->isHidden()) ); + ui->load_yaml_tuning_button->setHidden( !(ui->load_yaml_tuning_button->isHidden()) ); +} + void EnableControllerLoadYamlBar::showHideController_safe_changed() { ui->enable_safe_button ->setHidden( !(ui->enable_safe_button->isHidden()) ); @@ -89,6 +95,17 @@ void EnableControllerLoadYamlBar::on_enable_safe_button_clicked() #endif } +void EnableControllerLoadYamlBar::on_enable_tuning_button_clicked() +{ +#ifdef CATKIN_MAKE + d_fall_pps::IntWithHeader msg; + fillIntMessageHeader(msg); + msg.data = CMD_USE_TUNING_CONTROLLER; + this->commandPublisher.publish(msg); + ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Tuning Controller"); +#endif +} + void EnableControllerLoadYamlBar::on_enable_picker_button_clicked() { #ifdef CATKIN_MAKE @@ -114,11 +131,11 @@ void EnableControllerLoadYamlBar::on_enable_student_button_clicked() void EnableControllerLoadYamlBar::on_enable_default_button_clicked() { #ifdef CATKIN_MAKE - //d_fall_pps::IntWithHeader msg; - //fillIntMessageHeader(msg); - //msg.data = CMD_USE_STUDENT_CONTROLLER; - //this->commandPublisher.publish(msg); - //ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Student Controller"); + d_fall_pps::IntWithHeader msg; + fillIntMessageHeader(msg); + msg.data = CMD_USE_SAFE_CONTROLLER; + this->commandPublisher.publish(msg); + ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Safe Controller"); #endif } @@ -132,6 +149,22 @@ void EnableControllerLoadYamlBar::on_load_yaml_safe_button_clicked() #endif } +void EnableControllerLoadYamlBar::on_load_yaml_tuning_button_clicked() +{ +#ifdef CATKIN_MAKE + // Create a local variable for the message + d_fall_pps::StringWithHeader yaml_filename_msg; + // Set for whom this applies to + fillStringMessageHeader(yaml_filename_msg); + // Specify the data + yaml_filename_msg.data = "TuningController"; + // Send the message + m_requestLoadYamlFilenamePublisher.publish(yaml_filename_msg); + // Inform the user that the menu item was selected + ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Load Tuning Controller YAML was clicked."); +#endif +} + void EnableControllerLoadYamlBar::on_load_yaml_picker_button_clicked() { #ifdef CATKIN_MAKE diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp index f9173ae6a848664f71a1b372fe3c26318831ae78..b96cbfa548fafb1152b4a733b6f3e39912a38ee0 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp @@ -140,6 +140,8 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : // > For the picker controller ui->action_showHideController_picker->trigger(); + // > For the tuning controller + ui->action_showHideController_tuning->trigger(); // > For the safe controller ui->action_showHideController_safe->trigger(); @@ -234,6 +236,13 @@ void MainWindow::on_action_showHideController_picker_changed() ui->customWidget_controller_tabs->showHideController_picker_changed(); } +void MainWindow::on_action_showHideController_tuning_changed() +{ + // Notify the UI elements of this change + ui->customWidget_enableControllerLoadYamlBar->showHideController_tuning_changed(); + ui->customWidget_controller_tabs->showHideController_tuning_changed(); +} + void MainWindow::on_action_showHideController_safe_changed() { // Notify the UI elements of this change diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/tuningcontrollertab.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/tuningcontrollertab.cpp new file mode 100644 index 0000000000000000000000000000000000000000..98a271f51e9ba0c56c6e4d5c4d67bf44a5628d1b --- /dev/null +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/tuningcontrollertab.cpp @@ -0,0 +1,14 @@ +#include "tuningcontrollertab.h" +#include "ui_tuningcontrollertab.h" + +TuningControllerTab::TuningControllerTab(QWidget *parent) : + QWidget(parent), + ui(new Ui::TuningControllerTab) +{ + ui->setupUi(this); +} + +TuningControllerTab::~TuningControllerTab() +{ + delete ui; +}