From 33769a7a87bd4fbd0e51cdbb9783eadf6ff4198f Mon Sep 17 00:00:00 2001 From: beuchatp <beuchatp@control.ee.ethz.ch> Date: Sun, 3 Feb 2019 09:20:06 +0100 Subject: [PATCH] Filled in the Picker GUI and connected all the buttons to Qt code. Next step is to integrate the Picker GUI with ROS --- .../forms/pickercontrollertab.ui | 2548 ++++++++++++++++- .../include/pickercontrollertab.h | 186 ++ .../src/pickercontrollertab.cpp | 1337 +++++++++ 3 files changed, 4065 insertions(+), 6 deletions(-) diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/pickercontrollertab.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/pickercontrollertab.ui index 0b90bdd1..0527a979 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/pickercontrollertab.ui +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/pickercontrollertab.ui @@ -6,20 +6,2556 @@ <rect> <x>0</x> <y>0</y> - <width>400</width> - <height>300</height> + <width>1978</width> + <height>1188</height> </rect> </property> + <property name="font"> + <font> + <pointsize>16</pointsize> + </font> + </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Picker</string> + <layout class="QGridLayout" name="gridLayout_2"> + <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> - </widget> + <item row="1" column="0"> + <widget class="Line" name="line_15"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="4" column="1"> + <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="4" 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> + <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="19" column="3"> + <widget class="Line" name="line_24"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="16" column="6"> + <widget class="QLineEdit" name="lineEdit_increment_y"> + <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> + <item row="8" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_22"> + <item> + <widget class="QCheckBox" name="checkbox_goto_end"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="8" column="4"> + <layout class="QHBoxLayout" name="horizontalLayout_13"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_end_x"> + <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> + <item> + <widget class="QPushButton" name="button_goto_end_inc_minus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_end_inc_plus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="8" column="8"> + <layout class="QHBoxLayout" name="horizontalLayout_35"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_end_yaw"> + <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> + <item> + <widget class="QPushButton" name="button_goto_end_inc_minus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_end_inc_plus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="16" column="7"> + <widget class="QLineEdit" name="lineEdit_increment_z"> + <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> + <item row="7" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> + <item> + <widget class="QPushButton" name="button_lift_up"> + <property name="text"> + <string>Lift Up</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_lift_up_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="12" column="6"> + <widget class="Line" name="line_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="17" column="8"> + <widget class="Line" name="line_13"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="9" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> + <item> + <widget class="QPushButton" name="button_put_down"> + <property name="text"> + <string>Put Down</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_put_down_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_function_column"> + <property name="text"> + <string>Function</string> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QLabel" name="label_smooth_column"> + <property name="text"> + <string>Smooth</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="6" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QPushButton" name="button_attach"> + <property name="text"> + <string>Attach</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_attach_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="10" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_7"> + <item> + <widget class="QPushButton" name="button_squat"> + <property name="text"> + <string>Squaut</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_squat_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="5" column="8"> + <layout class="QHBoxLayout" name="horizontalLayout_34"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_start_yaw"> + <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> + <item> + <widget class="QPushButton" name="button_goto_start_inc_minus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_start_inc_plus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="18" column="0"> + <widget class="QLabel" name="label_current"> + <property name="text"> + <string>Current:</string> + </property> + </widget> + </item> + <item row="18" column="8"> + <widget class="QLineEdit" name="lineEdit_current_yaw"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="12" column="0"> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="7"> + <widget class="QLabel" name="label_z_column"> + <property name="text"> + <string>z[m]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="4"> + <widget class="QLabel" name="label_x_column"> + <property name="text"> + <string>x[m]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="12" column="9"> + <widget class="Line" name="line_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="18" column="4"> + <widget class="QLineEdit" name="lineEdit_current_x"> + <property name="enabled"> + <bool>true</bool> + </property> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="8" column="6"> + <layout class="QHBoxLayout" name="horizontalLayout_21"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_end_y"> + <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> + <item> + <widget class="QPushButton" name="button_goto_end_inc_minus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_end_inc_plus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="6"> + <widget class="QLabel" name="label_y_column"> + <property name="text"> + <string>y[m]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="8" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QPushButton" name="button_goto_end"> + <property name="text"> + <string>Goto End</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_goto_end_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="14" column="6"> + <layout class="QHBoxLayout" name="horizontalLayout_17"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_standby_y"> + <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> + <item> + <widget class="QPushButton" name="button_stanby_inc_minus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_stanby_inc_plus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="5" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_26"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_start_z"> + <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> + <item> + <widget class="QPushButton" name="button_goto_start_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_start_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="16" column="8"> + <widget class="QLineEdit" name="lineEdit_increment_yaw"> + <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> + <item row="21" column="8"> + <widget class="Line" name="line_35"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="16" column="9"> + <widget class="QLineEdit" name="lineEdit_increment_mass"> + <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> + <item row="11" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_32"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_jump_z"> + <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> + <item> + <widget class="QPushButton" name="button_jump_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_jump_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="18" column="7"> + <widget class="QLineEdit" name="lineEdit_current_z"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="17" column="0"> + <widget class="Line" name="line_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="9"> + <widget class="QLabel" name="label_mass_column"> + <property name="text"> + <string>mass[g]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="12" column="8"> + <widget class="Line" name="line_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="6" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_16"> + <item> + <widget class="QCheckBox" name="checkbox_attach"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="5" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QPushButton" name="button_goto_start"> + <property name="text"> + <string>Goto Start</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_goto_start_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="7" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_28"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_lift_up_z"> + <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> + <item> + <widget class="QPushButton" name="button_lift_up_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_lift_up_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="17" column="9"> + <widget class="Line" name="line_14"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="16" column="4"> + <widget class="QLineEdit" name="lineEdit_increment_x"> + <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> + <item row="7" column="9"> + <layout class="QHBoxLayout" name="horizontalLayout_44"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_lift_up_mass"> + <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> + <item> + <widget class="QPushButton" name="button_lift_up_inc_minus_mass"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_lift_up_inc_plus_mass"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="18" column="6"> + <widget class="QLineEdit" name="lineEdit_current_y"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="12" column="3"> + <widget class="Line" name="line_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="17" column="4"> + <widget class="Line" name="line_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="2" column="8"> + <widget class="QLabel" name="label_yaw_column"> + <property name="text"> + <string>yaw[deg]</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="17" column="6"> + <widget class="Line" name="line_11"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="11" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_8"> + <item> + <widget class="QPushButton" name="button_jump"> + <property name="text"> + <string>Jump</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_jump_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="10" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_31"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_squat_z"> + <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> + <item> + <widget class="QPushButton" name="button_squat_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_squat_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="17" column="7"> + <widget class="Line" name="line_12"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="6" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_27"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_attach_z"> + <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> + <item> + <widget class="QPushButton" name="button_attach_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_attach_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="14" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="button_standby"> + <property name="text"> + <string>Standby</string> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_standby_active"> + <property name="minimumSize"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color:green;</string> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + </widget> + </item> + </layout> + </item> + <item row="5" column="4"> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_start_x"> + <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> + <item> + <widget class="QPushButton" name="button_goto_start_inc_minus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_start_inc_plus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="12" column="7"> + <widget class="Line" name="line_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="16" column="0"> + <widget class="QLabel" name="label_increment"> + <property name="text"> + <string>Increment:</string> + </property> + </widget> + </item> + <item row="5" column="6"> + <layout class="QHBoxLayout" name="horizontalLayout_18"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_goto_start_y"> + <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> + <item> + <widget class="QPushButton" name="button_goto_start_inc_minus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_goto_start_inc_plus_y"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="9" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_30"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_put_down_z"> + <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> + <item> + <widget class="QPushButton" name="button_put_down_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_put_down_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="12" column="4"> + <widget class="Line" name="line_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="17" column="3"> + <widget class="Line" name="line_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="15" column="0"> + <widget class="Line" name="line_16"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="14" column="8"> + <layout class="QHBoxLayout" name="horizontalLayout_33"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_standby_yaw"> + <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> + <item> + <widget class="QPushButton" name="button_stanby_inc_minus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_stanby_inc_plus_yaw"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="14" column="4"> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_standby_x"> + <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> + <item> + <widget class="QPushButton" name="button_stanby_inc_minus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_stanby_inc_plus_x"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="5" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_14"> + <item> + <widget class="QCheckBox" name="checkbox_goto_start"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="11" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_29"> + <item> + <widget class="QCheckBox" name="checkbox_jump"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="15" column="3"> + <widget class="Line" name="line_17"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="9" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_23"> + <item> + <widget class="QCheckBox" name="checkbox_put_down"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="7" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_19"> + <item> + <widget class="QCheckBox" name="checkbox_lift_up"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="14" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_11"> + <item> + <widget class="QCheckBox" name="checkbox_standby"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="10" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_24"> + <item> + <widget class="QCheckBox" name="checkbox_squat"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="14" column="7"> + <layout class="QHBoxLayout" name="horizontalLayout_25"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_standby_z"> + <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> + <item> + <widget class="QPushButton" name="button_stanby_inc_minus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_stanby_inc_plus_z"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="15" column="4"> + <widget class="Line" name="line_18"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="14" column="9"> + <layout class="QHBoxLayout" name="horizontalLayout_41"> + <property name="spacing"> + <number>0</number> + </property> + <item> + <widget class="QLineEdit" name="lineEdit_standby_mass"> + <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> + <item> + <widget class="QPushButton" name="button_stanby_inc_minus_mass"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="button_stanby_inc_plus_mass"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>+</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="15" column="6"> + <widget class="Line" name="line_19"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="15" column="7"> + <widget class="Line" name="line_20"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="15" column="8"> + <widget class="Line" name="line_21"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="15" column="9"> + <widget class="Line" name="line_22"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="20" column="0"> + <widget class="QLabel" name="label_error"> + <property name="text"> + <string>Error:</string> + </property> + </widget> + </item> + <item row="22" column="0"> + <widget class="QLabel" name="label_measured"> + <property name="text"> + <string>Measured:</string> + </property> + </widget> + </item> + <item row="18" column="9"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="19" column="0"> + <widget class="Line" name="line_23"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="9"> + <widget class="Line" name="line_36"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="19" column="4"> + <widget class="Line" name="line_25"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="19" column="6"> + <widget class="Line" name="line_26"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="19" column="7"> + <widget class="Line" name="line_27"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="19" column="9"> + <widget class="Line" name="line_29"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="19" column="8"> + <widget class="Line" name="line_28"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="3"> + <widget class="Line" name="line_31"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="0"> + <widget class="Line" name="line_30"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="4"> + <widget class="Line" name="line_32"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="6"> + <widget class="Line" name="line_33"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="21" column="7"> + <widget class="Line" name="line_34"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="18" column="3"> + <layout class="QHBoxLayout" name="horizontalLayout_15"> + <item> + <widget class="QCheckBox" name="checkbox_current"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </item> + <item row="20" column="4"> + <widget class="QLineEdit" name="lineEdit_error_x"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="20" column="6"> + <widget class="QLineEdit" name="lineEdit_error_y"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="20" column="7"> + <widget class="QLineEdit" name="lineEdit_error_z"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="20" column="8"> + <widget class="QLineEdit" name="lineEdit_error_yaw"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="22" column="4"> + <widget class="QLineEdit" name="lineEdit_measured_x"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="22" column="7"> + <widget class="QLineEdit" name="lineEdit_measured_z"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="22" column="6"> + <widget class="QLineEdit" name="lineEdit_measured_y"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="22" column="8"> + <widget class="QLineEdit" name="lineEdit_measured_yaw"> + <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> + <property name="readOnly"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="2" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_12"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <item> + <widget class="QCheckBox" name="checkbox_should_publish_value_changed"> + <property name="maximumSize"> + <size> + <width>40</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string> + </property> + <property name="text"> + <string/> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_should_publish_value_changed"> + <property name="font"> + <font> + <pointsize>14</pointsize> + </font> + </property> + <property name="text"> + <string>Publish setpoint change everytime a {x,y,z,yaw,mass} value is changed?</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="3" column="0"> + <widget class="Line" name="line_37"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + </layout> </item> </layout> </widget> diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/pickercontrollertab.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/pickercontrollertab.h index c8c83a3a..1a49ebd6 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/pickercontrollertab.h +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/pickercontrollertab.h @@ -2,6 +2,34 @@ #define PICKERCONTROLLERTAB_H #include <QWidget> +#include <QVector> + +#define DECIMAL_PLACES_POSITION 2 +#define DECIMAL_PLACES_ANGLE_DEGREES 1 +#define DECIMAL_PLACES_MASS_GRAMS 1 + +#define DEFAULT_INCREMENT_POSITION_XY 0.01 +#define DEFAULT_INCREMENT_POSITION_Z 0.01 +#define DEFAULT_INCREMENT_ANGLE_DEGREES 5 +#define DEFAULT_INCREMENT_MASS_GRAMS 1 + +#define PICKER_STATE_UNKNOWN -1 +#define PICKER_STATE_STANDBY 0 +#define PICKER_STATE_GOTO_START 1 +#define PICKER_STATE_ATTACH 2 +#define PICKER_STATE_LIFT 3 +#define PICKER_STATE_GOTO_END 4 +#define PICKER_STATE_PUT_DOWN 5 +#define PICKER_STATE_SQUAT 6 +#define PICKER_STATE_JUMP 7 + +#define PICKER_DEFAULT_X 0 +#define PICKER_DEFAULT_Y 0 +#define PICKER_DEFAULT_Z 0.4 +#define PICKER_DEFAULT_YAW_DEGREES 0 +#define PICKER_DEFAULT_MASS_GRAMS 30 + + namespace Ui { class PickerControllerTab; @@ -15,6 +43,164 @@ public: explicit PickerControllerTab(QWidget *parent = 0); ~PickerControllerTab(); +private: + int current_picker_state = PICKER_STATE_STANDBY; + + void publish_setpoint_if_current_state_matches(QVector<int> state_to_match); + + void publish_request_setpoint_change_for_state(int state_to_publish); + +private slots: + void on_button_goto_start_clicked(); + + void on_button_attach_clicked(); + + void on_button_lift_up_clicked(); + + void on_button_goto_end_clicked(); + + void on_button_put_down_clicked(); + + void on_button_squat_clicked(); + + void on_button_jump_clicked(); + + void on_button_standby_clicked(); + + void on_checkbox_goto_start_clicked(); + + void on_checkbox_attach_clicked(); + + void on_checkbox_lift_up_clicked(); + + void on_checkbox_goto_end_clicked(); + + void on_checkbox_put_down_clicked(); + + void on_checkbox_squat_clicked(); + + void on_checkbox_jump_clicked(); + + void on_checkbox_standby_clicked(); + + void on_button_goto_start_inc_minus_x_clicked(); + + void on_button_goto_start_inc_plus_x_clicked(); + + void on_button_goto_start_inc_minus_y_clicked(); + + void on_button_goto_start_inc_plus_y_clicked(); + + void on_button_goto_start_inc_minus_z_clicked(); + + void on_button_goto_start_inc_plus_z_clicked(); + + void on_button_goto_start_inc_minus_yaw_clicked(); + + void on_button_goto_start_inc_plus_yaw_clicked(); + + void on_button_attach_inc_minus_z_clicked(); + + void on_button_attach_inc_plus_z_clicked(); + + void on_button_lift_up_inc_minus_z_clicked(); + + void on_button_lift_up_inc_plus_z_clicked(); + + void on_button_lift_up_inc_minus_mass_clicked(); + + void on_button_lift_up_inc_plus_mass_clicked(); + + void on_button_goto_end_inc_minus_x_clicked(); + + void on_button_goto_end_inc_plus_x_clicked(); + + void on_button_goto_end_inc_minus_y_clicked(); + + void on_button_goto_end_inc_plus_y_clicked(); + + void on_button_goto_end_inc_minus_yaw_clicked(); + + void on_button_goto_end_inc_plus_yaw_clicked(); + + void on_button_put_down_inc_minus_z_clicked(); + + void on_button_put_down_inc_plus_z_clicked(); + + void on_button_squat_inc_minus_z_clicked(); + + void on_button_squat_inc_plus_z_clicked(); + + void on_button_jump_inc_minus_z_clicked(); + + void on_button_jump_inc_plus_z_clicked(); + + void on_button_stanby_inc_minus_x_clicked(); + + void on_button_stanby_inc_plus_x_clicked(); + + void on_button_stanby_inc_minus_y_clicked(); + + void on_button_stanby_inc_plus_y_clicked(); + + void on_button_stanby_inc_minus_z_clicked(); + + void on_button_stanby_inc_plus_z_clicked(); + + void on_button_stanby_inc_minus_yaw_clicked(); + + void on_button_stanby_inc_plus_yaw_clicked(); + + void on_button_stanby_inc_minus_mass_clicked(); + + void on_button_stanby_inc_plus_mass_clicked(); + + void on_lineEdit_goto_start_x_editingFinished(); + + void on_lineEdit_goto_start_y_editingFinished(); + + void on_lineEdit_goto_start_z_editingFinished(); + + void on_lineEdit_goto_start_yaw_editingFinished(); + + void on_lineEdit_attach_z_editingFinished(); + + void on_lineEdit_lift_up_z_editingFinished(); + + void on_lineEdit_lift_up_mass_editingFinished(); + + void on_lineEdit_goto_end_x_editingFinished(); + + void on_lineEdit_goto_end_y_editingFinished(); + + void on_lineEdit_goto_end_yaw_editingFinished(); + + void on_lineEdit_put_down_z_editingFinished(); + + void on_lineEdit_squat_z_editingFinished(); + + void on_lineEdit_jump_z_editingFinished(); + + void on_lineEdit_standby_x_editingFinished(); + + void on_lineEdit_standby_y_editingFinished(); + + void on_lineEdit_standby_z_editingFinished(); + + void on_lineEdit_standby_yaw_editingFinished(); + + void on_lineEdit_standby_mass_editingFinished(); + + void on_lineEdit_increment_x_editingFinished(); + + void on_lineEdit_increment_y_editingFinished(); + + void on_lineEdit_increment_z_editingFinished(); + + void on_lineEdit_increment_yaw_editingFinished(); + + void on_lineEdit_increment_mass_editingFinished(); + private: Ui::PickerControllerTab *ui; }; diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/pickercontrollertab.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/pickercontrollertab.cpp index f71f7205..f8cc168e 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/pickercontrollertab.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/pickercontrollertab.cpp @@ -6,9 +6,1346 @@ PickerControllerTab::PickerControllerTab(QWidget *parent) : ui(new Ui::PickerControllerTab) { ui->setupUi(this); + + + // HIDE ALL THE "GREEN FRAMES" + ui->frame_goto_start_active->setVisible(false); + ui->frame_attach_active->setVisible(false); + ui->frame_lift_up_active->setVisible(false); + ui->frame_goto_end_active->setVisible(false); + ui->frame_put_down_active->setVisible(false); + ui->frame_squat_active->setVisible(false); + ui->frame_jump_active->setVisible(false); + ui->frame_standby_active->setVisible(false); + + // SET DEFAULTS FOR THE INCREMENT + ui->lineEdit_increment_x ->setText(QString::number( DEFAULT_INCREMENT_POSITION_XY, 'f', DECIMAL_PLACES_POSITION)); + ui->lineEdit_increment_y ->setText(QString::number( DEFAULT_INCREMENT_POSITION_XY, 'f', DECIMAL_PLACES_POSITION)); + ui->lineEdit_increment_z ->setText(QString::number( DEFAULT_INCREMENT_POSITION_Z, 'f', DECIMAL_PLACES_POSITION)); + ui->lineEdit_increment_yaw ->setText(QString::number( DEFAULT_INCREMENT_ANGLE_DEGREES, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + ui->lineEdit_increment_mass->setText(QString::number( DEFAULT_INCREMENT_MASS_GRAMS, 'f', DECIMAL_PLACES_MASS_GRAMS)); + + // SET THE INITIAL CHECKBOX STATE FOR SMOOTHING + ui->checkbox_goto_start->setChecked(true); + ui->checkbox_attach ->setChecked(true); + ui->checkbox_lift_up ->setChecked(true); + ui->checkbox_goto_end ->setChecked(true); + ui->checkbox_put_down ->setChecked(true); + ui->checkbox_squat ->setChecked(true); + ui->checkbox_jump ->setChecked(false); + ui->checkbox_standby ->setChecked(true); + ui->checkbox_current ->setChecked(false); + + // SET THE INITIAL CHECKBOX STATE FOR PUBLISHING EVERY CHANGED VALUE + ui->checkbox_should_publish_value_changed->setChecked(true); } PickerControllerTab::~PickerControllerTab() { delete ui; } + + + + + + +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // +// PUBLISH CHANGES IN STATE AND SETPOINT +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // + +void PickerControllerTab::publish_setpoint_if_current_state_matches(QVector<int> state_to_match) +{ + if ( state_to_match.contains(current_picker_state) ) + { + publish_request_setpoint_change_for_state(current_picker_state); + } +} + +void PickerControllerTab::publish_request_setpoint_change_for_state(int state_to_publish) +{ + // Initiliase variables for the setpoing + bool req_should_smooth; + float req_x; + float req_y; + float req_z; + float req_yaw; + float req_mass; + + + // Switch between the possible states and get the respectively + // values for the setpoint + switch (state_to_publish) + { + case PICKER_STATE_STANDBY: + { + req_should_smooth = ui->checkbox_standby->isChecked(); + req_x = (ui->lineEdit_standby_x ->text()).toFloat(); + req_y = (ui->lineEdit_standby_y ->text()).toFloat(); + req_z = (ui->lineEdit_standby_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_standby_yaw ->text()).toFloat(); + req_mass = (ui->lineEdit_standby_mass->text()).toFloat(); + break; + } + case PICKER_STATE_GOTO_START: + { + req_should_smooth = ui->checkbox_goto_start->isChecked(); + req_x = (ui->lineEdit_goto_start_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_start_y ->text()).toFloat(); + req_z = (ui->lineEdit_goto_start_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_standby_mass ->text()).toFloat(); + break; + } + case PICKER_STATE_ATTACH: + { + req_should_smooth = ui->checkbox_attach->isChecked(); + req_x = (ui->lineEdit_goto_start_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_start_y ->text()).toFloat(); + req_z = (ui->lineEdit_attach_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_standby_mass ->text()).toFloat(); + break; + } + case PICKER_STATE_LIFT: + { + req_should_smooth = ui->checkbox_lift_up->isChecked(); + req_x = (ui->lineEdit_goto_start_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_start_y ->text()).toFloat(); + req_z = (ui->lineEdit_lift_up_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_lift_up_mass ->text()).toFloat(); + break; + } + case PICKER_STATE_GOTO_END: + { + req_should_smooth = ui->checkbox_goto_end->isChecked(); + req_x = (ui->lineEdit_goto_end_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_end_y ->text()).toFloat(); + req_z = (ui->lineEdit_lift_up_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_lift_up_mass->text()).toFloat(); + break; + } + case PICKER_STATE_PUT_DOWN: + { + req_should_smooth = ui->checkbox_put_down->isChecked(); + req_x = (ui->lineEdit_goto_end_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_end_y ->text()).toFloat(); + req_z = (ui->lineEdit_put_down_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_lift_up_mass->text()).toFloat(); + break; + } + case PICKER_STATE_SQUAT: + { + req_should_smooth = ui->checkbox_squat->isChecked(); + req_x = (ui->lineEdit_goto_end_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_end_y ->text()).toFloat(); + req_z = (ui->lineEdit_squat_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_standby_mass->text()).toFloat(); + break; + } + case PICKER_STATE_JUMP: + { + req_should_smooth = ui->checkbox_jump->isChecked(); + req_x = (ui->lineEdit_goto_end_x ->text()).toFloat(); + req_y = (ui->lineEdit_goto_end_y ->text()).toFloat(); + req_z = (ui->lineEdit_jump_z ->text()).toFloat(); + req_yaw = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + req_mass = (ui->lineEdit_standby_mass->text()).toFloat(); + break; + } + default: + { + req_should_smooth = true; + req_x = PICKER_DEFAULT_X; + req_y = PICKER_DEFAULT_Y; + req_z = PICKER_DEFAULT_Z; + req_yaw = PICKER_DEFAULT_YAW_DEGREES; + req_mass = PICKER_DEFAULT_MASS_GRAMS; + break; + } + } + + // Publish a ROS message with the setpoint to be requested + +} + + + + + +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // +// STATE BUTTONS CLICKED +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // + +void PickerControllerTab::on_button_goto_start_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_GOTO_START); +} + +void PickerControllerTab::on_button_attach_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_ATTACH); +} + +void PickerControllerTab::on_button_lift_up_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_LIFT); +} + +void PickerControllerTab::on_button_goto_end_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_GOTO_END); +} + +void PickerControllerTab::on_button_put_down_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_PUT_DOWN); +} + +void PickerControllerTab::on_button_squat_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_SQUAT); +} + +void PickerControllerTab::on_button_jump_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_JUMP); +} + +void PickerControllerTab::on_button_standby_clicked() +{ + // Directly call the function that publishes state (and setpoint) changes + publish_request_setpoint_change_for_state(PICKER_STATE_STANDBY); +} + + + + + +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // +// CHECK BOXES CLICKED +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // + +void PickerControllerTab::on_checkbox_goto_start_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_attach_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_lift_up_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_goto_end_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_put_down_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_squat_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_jump_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_checkbox_standby_clicked() +{ + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + + + + + +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // +// INCREMENT BUTTONS CLICKED +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // + +// >> FOR GOTO START + +void PickerControllerTab::on_button_goto_start_inc_minus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_start_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_plus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_start_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_minus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_start_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_plus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_start_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_start_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_start_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_minus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_start_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_start_inc_plus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_start_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR ATTACH + +void PickerControllerTab::on_button_attach_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_attach_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_attach_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_attach_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_attach_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_attach_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR LIFT UP + +void PickerControllerTab::on_button_lift_up_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_lift_up_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_lift_up_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_lift_up_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_lift_up_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_lift_up_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_lift_up_inc_minus_mass_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_lift_up_mass->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_mass ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_lift_up_mass->setText(QString::number( new_value, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_lift_up_inc_plus_mass_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_lift_up_mass->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_mass ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_lift_up_mass->setText(QString::number( new_value, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR GOTO END + +void PickerControllerTab::on_button_goto_end_inc_minus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_end_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_end_inc_plus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_end_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_end_inc_minus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_end_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_end_inc_plus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_end_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_end_inc_minus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_goto_end_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_goto_end_inc_plus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_goto_end_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR PUT DOWN + +void PickerControllerTab::on_button_put_down_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_put_down_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_put_down_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_put_down_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_put_down_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_put_down_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR SQUAT + +void PickerControllerTab::on_button_squat_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_squat_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_squat_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_squat_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_squat_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_squat_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR JUMP + +void PickerControllerTab::on_button_jump_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_jump_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_jump_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_jump_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_jump_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_jump_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR STANDBY + +void PickerControllerTab::on_button_stanby_inc_minus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_standby_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_plus_x_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_x->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_x ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_standby_x->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_minus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_standby_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_plus_y_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_y->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_y ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_standby_y->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_minus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_standby_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_plus_z_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_z->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_z ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_standby_z->setText(QString::number( new_value, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_minus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_standby_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_plus_yaw_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_yaw->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_yaw ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_standby_yaw->setText(QString::number( new_value, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_minus_mass_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_mass->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_mass ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value - current_inc; + ui->lineEdit_standby_mass->setText(QString::number( new_value, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_button_stanby_inc_plus_mass_clicked() +{ + // Get the value from the respective line edit and increment + float current_value = (ui->lineEdit_standby_mass->text()).toFloat(); + float current_inc = (ui->lineEdit_increment_mass ->text()).toFloat(); + // Compute the new value and set it back + float new_value = current_value + current_inc; + ui->lineEdit_standby_mass->setText(QString::number( new_value, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + + + + + +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // +// LINE EDITS FINISHED EDITING +// ---------------------------------------------------------- // +// ---------------------------------------------------------- // + +// >> FOR GOTO START + +void PickerControllerTab::on_lineEdit_goto_start_x_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_start_x->text()).toFloat(); + ui->lineEdit_goto_start_x->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_goto_start_y_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_start_y->text()).toFloat(); + ui->lineEdit_goto_start_y->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_goto_start_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_start_z->text()).toFloat(); + ui->lineEdit_goto_start_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_goto_start_yaw_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_start_yaw->text()).toFloat(); + ui->lineEdit_goto_start_yaw->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR ATTACH + +void PickerControllerTab::on_lineEdit_attach_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_attach_z->text()).toFloat(); + ui->lineEdit_attach_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR LIFT UP + +void PickerControllerTab::on_lineEdit_lift_up_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_lift_up_z->text()).toFloat(); + ui->lineEdit_lift_up_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_lift_up_mass_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_lift_up_mass->text()).toFloat(); + ui->lineEdit_lift_up_mass->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_LIFT); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR GOTO END + +void PickerControllerTab::on_lineEdit_goto_end_x_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_end_x->text()).toFloat(); + ui->lineEdit_goto_end_x->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_goto_end_y_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_end_y->text()).toFloat(); + ui->lineEdit_goto_end_y->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_goto_end_yaw_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_goto_end_yaw->text()).toFloat(); + ui->lineEdit_goto_end_yaw->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_END); + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR PUT DOWN + +void PickerControllerTab::on_lineEdit_put_down_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_put_down_z->text()).toFloat(); + ui->lineEdit_put_down_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_PUT_DOWN); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR SQUAT + +void PickerControllerTab::on_lineEdit_squat_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_squat_z->text()).toFloat(); + ui->lineEdit_squat_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR JUMP + +void PickerControllerTab::on_lineEdit_jump_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_jump_z->text()).toFloat(); + ui->lineEdit_jump_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR STANDBY + +void PickerControllerTab::on_lineEdit_standby_x_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_standby_x->text()).toFloat(); + ui->lineEdit_standby_x->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_standby_y_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_standby_y->text()).toFloat(); + ui->lineEdit_standby_y->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_standby_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_standby_z->text()).toFloat(); + ui->lineEdit_standby_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_standby_yaw_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_standby_yaw->text()).toFloat(); + ui->lineEdit_standby_yaw->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +void PickerControllerTab::on_lineEdit_standby_mass_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_standby_mass->text()).toFloat(); + ui->lineEdit_standby_mass->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_MASS_GRAMS)); + // Call the function to publish the new setpoint if appropriate + if (ui->checkbox_should_publish_value_changed->isChecked()) + { + QVector<int> states_for_which_this_change_applies; + states_for_which_this_change_applies.append(PICKER_STATE_STANDBY); + states_for_which_this_change_applies.append(PICKER_STATE_GOTO_START); + states_for_which_this_change_applies.append(PICKER_STATE_ATTACH); + states_for_which_this_change_applies.append(PICKER_STATE_SQUAT); + states_for_which_this_change_applies.append(PICKER_STATE_JUMP); + publish_setpoint_if_current_state_matches(states_for_which_this_change_applies); + } +} + +// >> FOR INCREMENTS + +void PickerControllerTab::on_lineEdit_increment_x_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_increment_x->text()).toFloat(); + ui->lineEdit_increment_x->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); +} + +void PickerControllerTab::on_lineEdit_increment_y_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_increment_y->text()).toFloat(); + ui->lineEdit_increment_y->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); +} + +void PickerControllerTab::on_lineEdit_increment_z_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_increment_z->text()).toFloat(); + ui->lineEdit_increment_z->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_POSITION)); +} + +void PickerControllerTab::on_lineEdit_increment_yaw_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_increment_yaw->text()).toFloat(); + ui->lineEdit_increment_yaw->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_ANGLE_DEGREES)); +} + +void PickerControllerTab::on_lineEdit_increment_mass_editingFinished() +{ + // Get the value and set it back with two decimal places + float value_entered = (ui->lineEdit_increment_mass->text()).toFloat(); + ui->lineEdit_increment_mass->setText(QString::number( value_entered, 'f', DECIMAL_PLACES_MASS_GRAMS)); +} -- GitLab