diff --git a/dfall_ws/src/dfall_pkg/CMakeLists.txt b/dfall_ws/src/dfall_pkg/CMakeLists.txt index dcbc0a0525692b1676f0ab18a00dd05055e857bf..5e4e44e1379f988ec3a1dc93473e46f2172a4bdb 100755 --- a/dfall_ws/src/dfall_pkg/CMakeLists.txt +++ b/dfall_ws/src/dfall_pkg/CMakeLists.txt @@ -64,13 +64,6 @@ set(SYSTEM_CONFIG_GUI_RESOURCE_FILE_QRC ${PROJECT_SOURCE_DIR}/GUI_Qt/systemConf -# StudentGUI -- Add src, includes, and resources -set(STUDENT_GUI_LIB_PATH_SRC ${PROJECT_SOURCE_DIR}/GUI_Qt/studentGUI/src) -set(STUDENT_GUI_LIB_PATH_INC ${PROJECT_SOURCE_DIR}/GUI_Qt/studentGUI/include) -set(STUDENT_RESOURCE_FILE_QRC ${PROJECT_SOURCE_DIR}/GUI_Qt/studentGUI/studentgui.qrc) - - - # Flying Agent GUI -- Add src, includes, forms, and resources set(FLYING_AGENT_GUI_LIB_PATH_SRC ${PROJECT_SOURCE_DIR}/GUI_Qt/flyingAgentGUI/src) set(FLYING_AGENT_GUI_LIB_PATH_INC ${PROJECT_SOURCE_DIR}/GUI_Qt/flyingAgentGUI/include) @@ -107,18 +100,6 @@ qt5_add_resources(SYSTEM_CONFIG_GUI_RESOURCE_FILE_RRC ${SYSTEM_CONFIG_GUI_RESOUR -# StudentGUI -- Special Qt sources that need to be wrapped before being compiled -set(SRC_HDRS_QOBJECT_STUDENT_GUI - ${STUDENT_GUI_LIB_PATH_INC}/MainWindow.h - ${STUDENT_GUI_LIB_PATH_INC}/rosNodeThread_for_studentGUI.h - ) -# StudentGUI -- wrap UI file and QOBJECT files -qt5_wrap_ui(UIS_HDRS_STUDENT_GUI ${STUDENT_GUI_LIB_PATH_SRC}/MainWindow.ui) -qt5_wrap_cpp(SRC_MOC_HDRS_STUDENT_GUI ${SRC_HDRS_QOBJECT_STUDENT_GUI}) -# GUI -- wrap resource file qrc->rcc -qt5_add_resources(STUDENT_RESOURCE_FILE_RCC ${STUDENT_RESOURCE_FILE_QRC}) - - # Flying Agent GUI # - Special Qt sources that need to be wrapped before being compiled @@ -286,7 +267,6 @@ generate_messages( ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( INCLUDE_DIRS include ${SYSTEM_CONFIG_GUI_LIB_PATH_INC} # GUI -- include headers from GUI in package - INCLUDE_DIRS include ${STUDENT_GUI_LIB_PATH_INC} # StudentGUI -- include headers from GUI in package INCLUDE_DIRS include ${FLYING_AGENT_GUI_LIB_PATH_INC} # FlyingAgentGUI -- include headers from GUI in package LIBRARIES CATKIN_DEPENDS roscpp rospy std_msgs rosbag roslib @@ -301,9 +281,8 @@ catkin_package( ## Your package locations should be listed before other locations # include_directories(include) include_directories( - ${SYSTEM_CONFIG_GUI_LIB_PATH_INC} # GUI -- include directory inside GUI folder - ${STUDENT_GUI_LIB_PATH_INC} # StudentGUI -- include directory inside GUI folder - ${FLYING_AGENT_GUI_LIB_PATH_INC} # FlyingAgentGUI -- include directory inside GUI folder + ${SYSTEM_CONFIG_GUI_LIB_PATH_INC} # SystemConfigGUI -- include directory inside GUI folder + ${FLYING_AGENT_GUI_LIB_PATH_INC} # FlyingAgentGUI -- include directory inside GUI folder ${catkin_INCLUDE_DIRS} include include/nodes @@ -371,14 +350,6 @@ set(SYSTEM_CONFIG_GUI_CPP_SOURCES # compilation of sources -# StudentGUI -- Add sources here -set(STUDENT_GUI_CPP_SOURCES # compilation of sources - ${STUDENT_GUI_LIB_PATH_SRC}/MainWindow.cpp - ${STUDENT_GUI_LIB_PATH_SRC}/main.cpp - ${STUDENT_GUI_LIB_PATH_SRC}/rosNodeThread_for_studentGUI.cpp - ) - - # FLYING AGENT GUI -- Add sources here set(FLYING_AGENT_GUI_CPP_SOURCES # compilation of sources @@ -406,11 +377,6 @@ qt5_use_modules(systemConfigGUI Widgets) -# StudentGUI -- Add executables here -add_executable(student_GUI ${STUDENT_GUI_CPP_SOURCES} ${UIS_HDRS_STUDENT_GUI} ${SRC_MOC_HDRS_STUDENT_GUI} ${STUDENT_RESOURCE_FILE_RCC}) -qt5_use_modules(student_GUI Widgets) - - # FLYING AGENT GUI -- Add executables here add_executable(flyingAgentGUI ${FLYING_AGENT_GUI_CPP_SOURCES} ${UIS_HDRS_FLYING_AGENT_GUI} ${SRC_MOC_HDRS_FLYING_AGENT_GUI} ${FLYING_AGENT_GUI_RESOURCE_FILE_RCC}) qt5_use_modules(flyingAgentGUI Widgets) @@ -441,11 +407,6 @@ add_dependencies(systemConfigGUI dfall_pkg_generate_messages_cpp ${catkin_EXPORT -# StudentGUI-- dependencies -add_dependencies(student_GUI dfall_pkg_generate_messages_cpp ${catkin_EXPORTED_TARGETS}) - - - # FLYING AGENT GUI-- dependencies add_dependencies(flyingAgentGUI dfall_pkg_generate_messages_cpp ${catkin_EXPORTED_TARGETS}) @@ -499,12 +460,6 @@ target_link_libraries(systemConfigGUI ${catkin_LIBRARIES}) -# StudentGUI -- link libraries -target_link_libraries(student_GUI Qt5::Widgets) # GUI -- let student_GUI have acesss to Qt stuff -target_link_libraries(student_GUI ${catkin_LIBRARIES}) - - - # Flying Agent GUI -- link libraries target_link_libraries(flyingAgentGUI Qt5::Widgets) # GUI -- let flyingAgentGUI have acesss to Qt stuff target_link_libraries(flyingAgentGUI ${catkin_LIBRARIES}) diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_20.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_20.png deleted file mode 100644 index cc7ae62ab7c662f7cf3e098e713232d2d6e0ae14..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_20.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_40.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_40.png deleted file mode 100644 index cea5ab35b9605910112dd8a7e2eda371c430894b..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_40.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_60.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_60.png deleted file mode 100644 index 1f75257c3c1f44fc10f318274741942916b47b70..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_60.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_80.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_80.png deleted file mode 100644 index 8224e7e1e2ed8e251f37f802b14ce4ebd9027f35..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_80.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_empty.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_empty.png deleted file mode 100644 index 0bf35549aab7c7c0247cebd69a176d68ea67387c..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_empty.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_full.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_full.png deleted file mode 100644 index 495383be5e346e624d7a92670fcf9ddb053f99ef..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_full.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_unknown.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_unknown.png deleted file mode 100644 index e20348f65a39bac7c0e40a2a4c0b338ef018dc03..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/battery_unknown.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_disabling.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_disabling.png deleted file mode 100644 index 667c8027f2b902f08f8e81d3120599a5ed151d48..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_disabling.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_enabling.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_enabling.png deleted file mode 100644 index ef2dc5bffa6d27edbb6c6ff1171cd77a5af5c20a..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_enabling.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_flying.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_flying.png deleted file mode 100644 index b0b51f3d42edbfad9f875c1faa413391c4f21de9..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_flying.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_off.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_off.png deleted file mode 100644 index 70669664f07c12ef27a41f5b5fb918aff93da688..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_off.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_unknown.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_unknown.png deleted file mode 100644 index 5c0c7337a103e5726af53def62e37ad22209c972..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/flying_state_unknown.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connected.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connected.png deleted file mode 100644 index f9f3580113053f71fe86344e6f34a74e98c17b70..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connected.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connecting.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connecting.png deleted file mode 100644 index 5f1d4ca1b48496ecf1372e1a0f727058bbc24d95..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_connecting.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_disconnected.png b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_disconnected.png deleted file mode 100644 index 0e99e624009059328820b317c908d337caf55ddc..0000000000000000000000000000000000000000 Binary files a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/images/rf_disconnected.png and /dev/null differ diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/MainWindow.h b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/MainWindow.h deleted file mode 100644 index c792c91613ac2e8fdfa2062e0c4bb290b986c14c..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/MainWindow.h +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (C) 2017, ETH Zurich, D-ITET, Paul Beuchat, Angel Romero -// -// This file is part of D-FaLL-System. -// -// D-FaLL-System is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// D-FaLL-System is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with D-FaLL-System. If not, see <http://www.gnu.org/licenses/>. -// -// -// ---------------------------------------------------------------------------------- -// DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M -// D D F aaa L L S Y Y S T E MM MM -// D D --- FFFF a a L L --- SSS Y SSS T EEE M M M -// D D F a aa L L S Y S T E M M -// DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M -// -// -// DESCRIPTION: -// Main window of the Student's GUI -// -// ---------------------------------------------------------------------------------- - - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include <QMainWindow> -#include <QShortcut> - -#include <std_msgs/Int32.h> -#include <std_msgs/Float32.h> - -#include "rosNodeThread_for_studentGUI.h" - -#include "dfall_pkg/CrazyflieContext.h" -#include "dfall_pkg/CrazyflieData.h" -#include "dfall_pkg/Setpoint.h" -#include "dfall_pkg/SetpointV2.h" -#include "dfall_pkg/ViconSubscribeObjectName.h" - - -// Types of controllers being used: -#define SAFE_CONTROLLER 1 -#define DEMO_CONTROLLER 2 -#define STUDENT_CONTROLLER 3 -#define MPC_CONTROLLER 4 -#define REMOTE_CONTROLLER 5 -#define TUNING_CONTROLLER 6 -#define PICKER_CONTROLLER 7 - - -// Commands for CrazyRadio -#define CMD_RECONNECT 0 -#define CMD_DISCONNECT 1 - -// CrazyRadio states: -#define CONNECTED 0 -#define CONNECTING 1 -#define DISCONNECTED 2 - -// The constants that "command" changes in the -// operation state of this agent. These "commands" -// are sent from this GUI node to the "FlyingAgentClient" -// node where the command is enacted -#define CMD_USE_SAFE_CONTROLLER 1 -#define CMD_USE_DEMO_CONTROLLER 2 -#define CMD_USE_STUDENT_CONTROLLER 3 -#define CMD_USE_MPC_CONTROLLER 4 -#define CMD_USE_REMOTE_CONTROLLER 5 -#define CMD_USE_TUNING_CONTROLLER 6 -#define CMD_USE_PICKER_CONTROLLER 7 - -#define CMD_CRAZYFLY_TAKE_OFF 11 -#define CMD_CRAZYFLY_LAND 12 -#define CMD_CRAZYFLY_MOTORS_OFF 13 - -// Flying States -#define STATE_MOTORS_OFF 1 -#define STATE_TAKE_OFF 2 -#define STATE_FLYING 3 -#define STATE_LAND 4 - -// Battery states -#define BATTERY_STATE_NORMAL 0 -#define BATTERY_STATE_LOW 1 - -// Battery label image index -#define BATTERY_LABEL_IMAGE_INDEX_EMPTY 0 -#define BATTERY_LABEL_IMAGE_INDEX_20 1 -#define BATTERY_LABEL_IMAGE_INDEX_40 2 -#define BATTERY_LABEL_IMAGE_INDEX_60 3 -#define BATTERY_LABEL_IMAGE_INDEX_80 4 -#define BATTERY_LABEL_IMAGE_INDEX_FULL 5 -#define BATTERY_LABEL_IMAGE_INDEX_UNKNOWN 6 - -// For which controller parameters to load -#define LOAD_YAML_SAFE_CONTROLLER_AGENT 1 -#define LOAD_YAML_DEMO_CONTROLLER_AGENT 2 -#define LOAD_YAML_STUDENT_CONTROLLER_AGENT 3 -#define LOAD_YAML_MPC_CONTROLLER_AGENT 4 -#define LOAD_YAML_REMOTE_CONTROLLER_AGENT 5 -#define LOAD_YAML_TUNING_CONTROLLER_AGENT 6 -#define LOAD_YAML_PICKER_CONTROLLER_AGENT 7 - -#define LOAD_YAML_SAFE_CONTROLLER_COORDINATOR 11 -#define LOAD_YAML_DEMO_CONTROLLER_COORDINATOR 12 -#define LOAD_YAML_STUDENT_CONTROLLER_COORDINATOR 13 -#define LOAD_YAML_MPC_CONTROLLER_COORDINATOR 14 -#define LOAD_YAML_REMOTE_CONTROLLER_COORDINATOR 15 -#define LOAD_YAML_TUNING_CONTROLLER_COORDINATOR 16 -#define LOAD_YAML_PICKER_CONTROLLER_COORDINATOR 17 - - -// FOR WHICH BUTTON WAS PRESSED IN THE PICKER CONTOLLER -#define PICKER_BUTTON_GOTOSTART 1 -#define PICKER_BUTTON_ATTACH 2 -#define PICKER_BUTTON_PICKUP 3 -#define PICKER_BUTTON_GOTOEND 4 -#define PICKER_BUTTON_PUTDOWN 5 -#define PICKER_BUTTON_SQUAT 6 -#define PICKER_BUTTON_JUMP 7 - -#define PICKER_BUTTON_1 11 -#define PICKER_BUTTON_2 12 -#define PICKER_BUTTON_3 13 -#define PICKER_BUTTON_4 14 - - -// Universal constants -#define PI 3.141592653589 - -#define RAD2DEG 180.0/PI -#define DEG2RAD PI/180.0 - -namespace Ui { -class MainWindow; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(int argc, char **argv, QWidget *parent = 0); - ~MainWindow(); - -private slots: - void updateNewViconData(const ptrToMessage& p_msg); - - // # RF Crazyradio Connect Disconnect - void on_RF_Connect_button_clicked(); - void on_RF_disconnect_button_clicked(); - - // # Take off, lanf, motors off - void on_take_off_button_clicked(); - void on_land_button_clicked(); - void on_motors_OFF_button_clicked(); - - // # Setpoint - void on_set_setpoint_button_safe_clicked(); - void on_set_setpoint_button_demo_clicked(); - void on_set_setpoint_button_student_clicked(); - void on_set_setpoint_button_mpc_clicked(); - - // # Load Yaml when acting as the GUI for an Agent - void on_load_safe_yaml_button_clicked(); - void on_load_demo_yaml_button_clicked(); - void on_load_student_yaml_button_clicked(); - void on_load_mpc_yaml_button_clicked(); - void on_load_remote_yaml_button_clicked(); - void on_load_tuning_yaml_button_clicked(); - void on_load_picker_yaml_button_clicked(); - - // # Enable controllers - void on_enable_safe_controller_clicked(); - void on_enable_demo_controller_clicked(); - void on_enable_student_controller_clicked(); - void on_enable_mpc_controller_clicked(); - void on_enable_remote_controller_clicked(); - void on_enable_tuning_controller_clicked(); - void on_enable_picker_controller_clicked(); - - - - void on_demoButton_1_clicked(); - void on_demoButton_2_clicked(); - void on_demoButton_3_clicked(); - - void on_studentButton_1_clicked(); - void on_studentButton_2_clicked(); - void on_studentButton_3_clicked(); - - // Buttons within the REMOTE controller tab - void on_remote_subscribe_button_clicked(); - void on_remote_unsubscribe_button_clicked(); - void on_remote_activate_button_clicked(); - void on_remote_deactivate_button_clicked(); - - // Buttons within the TUNING controller tab - void on_tuning_test_horizontal_button_clicked(); - void on_tuning_test_vertical_button_clicked(); - void on_tuning_test_heading_button_clicked(); - void on_tuning_test_all_button_clicked(); - void on_tuning_test_circle_button_clicked(); - void on_tuning_slider_horizontal_valueChanged(int value); - void on_tuning_slider_vertical_valueChanged(int value); - void on_tuning_slider_heading_valueChanged(int value); - - // Interations with the PICKER controller tab - // > For the buttons - void on_picker_gotostart_button_clicked(); - void on_picker_attach_button_clicked(); - void on_picker_pickup_button_clicked(); - void on_picker_gotoend_button_clicked(); - void on_picker_putdown_button_clicked(); - void on_picker_squat_button_clicked(); - void on_picker_jump_button_clicked(); - void on_picker_1_button_clicked(); - void on_picker_2_button_clicked(); - void on_picker_3_button_clicked(); - void on_picker_4_button_clicked(); - // > For the sliders - void on_picker_x_slider_valueChanged(int value); - void on_picker_y_slider_valueChanged(int value); - void on_picker_z_slider_valueChanged(int value); - void on_picker_mass_slider_valueChanged(int value); - // > For the dial - void on_picker_yaw_dial_valueChanged(int value); - - - - - -private: - Ui::MainWindow *ui; - - QShortcut* m_close_GUI_shortcut; - - rosNodeThread* m_rosNodeThread; - int m_radio_status; - float m_battery_voltage; - int m_battery_level; - - std::string m_ros_namespace; - - ros::Timer m_timer_yaml_file_for_safe_controller; - ros::Timer m_timer_yaml_file_for_demo_controller; - ros::Timer m_timer_yaml_file_for_student_controller; - ros::Timer m_timer_yaml_file_for_mpc_controller; - ros::Timer m_timer_yaml_file_for_remote_controller; - ros::Timer m_timer_yaml_file_for_tuning_controller; - ros::Timer m_timer_yaml_file_for_picker_controller; - - - int m_student_id; - CrazyflieContext m_context; - - Setpoint m_safe_setpoint; - Setpoint m_demo_setpoint; - Setpoint m_student_setpoint; - Setpoint m_mpc_setpoint; - Setpoint m_picker_setpoint; - - int m_flying_state; - QMutex m_flying_state_mutex; - QMutex voltage_field_mutex; - QMutex battery_status_label_mutex; - QMutex rf_status_label_mutex; - int m_battery_state; - // BATTERY EMPTY VOLTAGES (THESE SHOULD BE READ IN AS PARAMTERS) - //const std::vector<float> m_cutoff_voltages {3.1966, 3.2711, 3.3061, 3.3229, 3.3423, 3.3592, 3.3694, 3.385, 3.4006, 3.4044, 3.4228, 3.4228, 3.4301, 3.4445, 3.4531, 3.4677, 3.4705, 3.4712, 3.4756, 3.483, 3.4944, 3.5008, 3.5008, 3.5084, 3.511, 3.5122, 3.5243, 3.5329, 3.5412, 3.5529, 3.5609, 3.5625, 3.5638, 3.5848, 3.6016, 3.6089, 3.6223, 3.628, 3.6299, 3.6436, 3.6649, 3.6878, 3.6983, 3.7171, 3.7231, 3.7464, 3.7664, 3.7938, 3.8008, 3.816, 3.8313, 3.8482, 3.866, 3.8857, 3.8984, 3.9159, 3.9302, 3.9691, 3.997, 4.14 }; - const float battery_voltage_empty_while_flying = 2.80; // in Volts - const float battery_voltage_empty_while_motors_off = 3.30; // in Volts - // BATTERY FULL VOLTAGES - const float battery_voltage_full_while_flying = 3.70; // in Volts - const float battery_voltage_full_while_motors_off = 4.20; // in Volts - - int m_battery_label_image_current_index; - - ros::Publisher crazyRadioCommandPublisher; - ros::Subscriber crazyRadioStatusSubscriber; - ros::Publisher FlyingAgentClientCommandPublisher; - ros::Subscriber CFBatterySubscriber; - ros::Subscriber flyingStateSubscriber; - ros::Subscriber batteryStateSubscriber; - - ros::Publisher controllerSetpointPublisher; - ros::Subscriber safeSetpointSubscriber; - - // SUBSCRIBERS AND PUBLISHERS: - // > For the Demo Controller SETPOINTS - ros::Publisher demoSetpointPublisher; - ros::Subscriber demoSetpointSubscriber; - // > For the Student Controller SETPOINTS - ros::Publisher studentSetpointPublisher; - ros::Subscriber studentSetpointSubscriber; - // > For the MPC Controller SETPOINTS - ros::Publisher mpcSetpointPublisher; - ros::Subscriber mpcSetpointSubscriber; - - // > For the Remote Controller subscribe action - ros::Publisher remoteSubscribePublisher; - // > For the Remote Controller activate action - ros::Publisher remoteActivatePublisher; - // > For the Remote Controller data - ros::Subscriber remoteDataSubscriber; - // > For the Remote Control setpoint - ros::Subscriber remoteControlSetpointSubscriber; - - // > For the TUNING CONTROLLER "test" button publisher - ros::Publisher tuningActivateTestPublisher; - // > For the TUNING CONTOLLER "gain" sliders - ros::Publisher tuningHorizontalGainPublisher; - ros::Publisher tuningVerticalGainPublisher; - ros::Publisher tuningHeadingGainPublisher; - - - - // > For the PICKER CONTROLLER - ros::Publisher pickerButtonPressedPublisher; - ros::Publisher pickerZSetpointPublisher; - ros::Publisher pickerYawSetpointPublisher; - ros::Publisher pickerMassPublisher; - ros::Publisher pickerXAdjustmentPublisher; - ros::Publisher pickerYAdjustmentPublisher; - ros::Publisher pickerSetpointPublisher; - ros::Subscriber pickerSetpointSubscriber; - ros::Subscriber pickerSetpointToGUISubscriber; - - ros::Publisher pickerButtonPressedWithSetpointPublisher; - - bool shouldSendWithSetpoint_for_pickerButtons = true; - - - - - ros::Publisher demoCustomButtonPublisher; - ros::Publisher studentCustomButtonPublisher; - - ros::Subscriber DBChangedSubscriber; - - - - // > For publishing a message that requests the - // YAML parameters to be re-loaded from file - // > The message contents specify which controller - // the parameters should be re-loaded for - ros::Publisher requestLoadControllerYamlPublisher; - - // Subscriber for locking the load the controller YAML - // parameters when the Coordintor GUI requests a load - ros::Subscriber requestLoadControllerYaml_from_my_GUI_Subscriber; - - - ros::Subscriber controllerUsedSubscriber; - - ros::ServiceClient centralManager; - - // callbacks - void crazyRadioStatusCallback(const std_msgs::Int32& msg); - void CFBatteryCallback(const std_msgs::Float32& msg); - void flyingStateChangedCallback(const std_msgs::Int32& msg); - - void safeSetpointCallback(const Setpoint& newSetpoint); - void demoSetpointCallback(const Setpoint& newSetpoint); - void studentSetpointCallback(const Setpoint& newSetpoint); - void mpcSetpointCallback(const Setpoint& newSetpoint); - void pickerSetpointCallback(const Setpoint& newSetpoint); - - - void remoteDataCallback(const CrazyflieData& objectData); - void remoteControlSetpointCallback(const CrazyflieData& setpointData); - - - // > For actually sending the button message - void send_picker_button_clicked_message(int button_index); - void send_picker_button_clicked_message_with_setpoint(const SetpointV2& setpointV2_to_send); - - - void DBChangedCallback(const std_msgs::Int32& msg); - - // # Load Yaml when acting as the GUI for an Agent - void safeYamlFileTimerCallback(const ros::TimerEvent&); - void demoYamlFileTimerCallback(const ros::TimerEvent&); - void studentYamlFileTimerCallback(const ros::TimerEvent&); - void mpcYamlFileTimerCallback(const ros::TimerEvent&); - void remoteYamlFileTimerCallback(const ros::TimerEvent&); - void tuningYamlFileTimerCallback(const ros::TimerEvent&); - void pickerYamlFileTimerCallback(const ros::TimerEvent&); - - - - void requestLoadControllerYaml_from_my_GUI_Callback(const std_msgs::Int32& msg); - void controllerUsedChangedCallback(const std_msgs::Int32& msg); - void batteryStateChangedCallback(const std_msgs::Int32& msg); - - float fromVoltageToPercent(float voltage); - void updateBatteryVoltage(float battery_voltage); - void setCrazyRadioStatus(int radio_status); - void loadCrazyflieContext(); - void coordinatesToLocal(CrazyflieData& cf); - - void initialize_demo_setpoint(); - void initialize_student_setpoint(); - void initialize_mpc_setpoint(); - void initialize_picker_setpoint(); - - - void disableGUI(); - void enableGUI(); - void highlightSafeControllerTab(); - void highlightDemoControllerTab(); - void highlightStudentControllerTab(); - void highlightMpcControllerTab(); - void highlightRemoteControllerTab(); - void highlightTuningControllerTab(); - void highlightPickerControllerTab(); - - bool setpointInsideBox(Setpoint setpoint, CrazyflieContext context); - Setpoint correctSetpointBox(Setpoint setpoint, CrazyflieContext context); - -}; - -#endif // MAINWINDOW_H diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/rosNodeThread_for_studentGUI.h b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/rosNodeThread_for_studentGUI.h deleted file mode 100644 index 823094a003a42ed910fdc0e877a75a875a99111c..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/include/rosNodeThread_for_studentGUI.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (C) 2017, ETH Zurich, D-ITET, Angel Romero -// -// This file is part of D-FaLL-System. -// -// D-FaLL-System is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// D-FaLL-System is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with D-FaLL-System. If not, see <http://www.gnu.org/licenses/>. -// -// -// ---------------------------------------------------------------------------------- -// DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M -// D D F aaa L L S Y Y S T E MM MM -// D D --- FFFF a a L L --- SSS Y SSS T EEE M M M -// D D F a aa L L S Y S T E M M -// DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M -// -// -// DESCRIPTION: -// Takes care of creating a ros node thread. -// -// ---------------------------------------------------------------------------------- - - -#ifndef ___ROSNODETHREAD_FOR_STUDENTGUI_H___ -#define ___ROSNODETHREAD_FOR_STUDENTGUI_H___ - -#include <QtCore> -#include <QThread> -#include <QStringList> -#include <stdlib.h> -#include <QMutex> -#include <iostream> -#include "assert.h" - -#include <ros/ros.h> -#include <ros/network.h> -#include "dfall_pkg/UnlabeledMarker.h" -#include "dfall_pkg/CrazyflieData.h" -#include "dfall_pkg/ViconData.h" - -using namespace dfall_pkg; - -typedef ViconData::ConstPtr ptrToMessage; - -Q_DECLARE_METATYPE(ptrToMessage) - - -class rosNodeThread : public QObject { - Q_OBJECT -public: - explicit rosNodeThread(int argc, char **pArgv, const char * node_name, QObject *parent = 0); - virtual ~rosNodeThread(); - - bool init(); - - // void messageCallback(const ViconData& data); - void messageCallback(const ptrToMessage& p_msg); - - ros::ServiceClient m_read_db_client; - ros::ServiceClient m_update_db_client; - ros::ServiceClient m_command_db_client; - - -signals: - - void newViconData(const ptrToMessage& p_msg); - -public slots: - void run(); - -private: - int m_Init_argc; - char** m_pInit_argv; - const char * m_node_name; - - QThread * m_pThread; - - ViconData m_vicon_data; - - ros::Subscriber m_vicon_subscriber; - // ros::Publisher sim_velocity; -}; -#endif - diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.cpp b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.cpp deleted file mode 100644 index 3d74934fa1e02f5b866dc32416324ad6aa9577c6..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.cpp +++ /dev/null @@ -1,2181 +0,0 @@ -// Copyright (C) 2017, ETH Zurich, D-ITET, Paul Beuchat, Angel Romero -// -// This file is part of D-FaLL-System. -// -// D-FaLL-System is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// D-FaLL-System is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with D-FaLL-System. If not, see <http://www.gnu.org/licenses/>. -// -// -// ---------------------------------------------------------------------------------- -// DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M -// D D F aaa L L S Y Y S T E MM MM -// D D --- FFFF a a L L --- SSS Y SSS T EEE M M M -// D D F a aa L L S Y S T E M M -// DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M -// -// -// DESCRIPTION: -// Main window of the Student's GUI -// -// ---------------------------------------------------------------------------------- - - -#include "MainWindow.h" -#include "ui_MainWindow.h" -#include <string> - -#include <ros/ros.h> -#include <ros/network.h> -#include <ros/package.h> - -#include "dfall_pkg/CMQuery.h" - -#include "dfall_pkg/ViconData.h" - -#include "dfall_pkg/CustomButton.h" - -MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : - QMainWindow(parent), - ui(new Ui::MainWindow), - m_battery_level(0) -{ - - ui->setupUi(this); - - m_rosNodeThread = new rosNodeThread(argc, argv, "student_GUI"); - m_rosNodeThread->init(); - - setCrazyRadioStatus(DISCONNECTED); - - m_ros_namespace = ros::this_node::getNamespace(); - ROS_INFO("[Student GUI] node namespace: %s", m_ros_namespace.c_str()); - - qRegisterMetaType<ptrToMessage>("ptrToMessage"); - QObject::connect(m_rosNodeThread, SIGNAL(newViconData(const ptrToMessage&)), this, SLOT(updateNewViconData(const ptrToMessage&))); - - ros::NodeHandle nodeHandle(m_ros_namespace); - - - // SUBSCRIBERS AND PUBLISHERS: - // > For the Demo Controller SETPOINTS and CUSTOM COMMANDS - demoSetpointPublisher = nodeHandle.advertise<Setpoint>("DemoControllerService/Setpoint", 1); - demoSetpointSubscriber = nodeHandle.subscribe("DemoControllerService/Setpoint", 1, &MainWindow::demoSetpointCallback, this); - demoCustomButtonPublisher = nodeHandle.advertise<CustomButton>("DemoControllerService/GUIButton", 1); - // > For the Student Controller SETPOINTS and CUSTOM COMMANDS - studentSetpointPublisher = nodeHandle.advertise<Setpoint>("StudentControllerService/Setpoint", 1); - studentSetpointSubscriber = nodeHandle.subscribe("StudentControllerService/Setpoint", 1, &MainWindow::studentSetpointCallback, this); - studentCustomButtonPublisher = nodeHandle.advertise<CustomButton>("StudentControllerService/GUIButton", 1); - // > For the MPC Controller SETPOINTS - mpcSetpointPublisher = nodeHandle.advertise<Setpoint>("MpcControllerService/Setpoint", 1); - mpcSetpointSubscriber = nodeHandle.subscribe("MpcControllerService/Setpoint", 1, &MainWindow::mpcSetpointCallback, this); - - - // > For the Remote Controller subscribe action - remoteSubscribePublisher = nodeHandle.advertise<ViconSubscribeObjectName>("RemoteControllerService/ViconSubscribeObjectName", 1); - // > For the Remote Controller activate action - remoteActivatePublisher = nodeHandle.advertise<std_msgs::Int32>("RemoteControllerService/Activate", 1); - // > For the Remote Controller data - remoteDataSubscriber = nodeHandle.subscribe("RemoteControllerService/RemoteData", 1, &MainWindow::remoteDataCallback, this);; - // > For the Remote Controller data - remoteControlSetpointSubscriber = nodeHandle.subscribe("RemoteControllerService/RemoteControlSetpoint", 1, &MainWindow::remoteControlSetpointCallback, this);; - - - // > For the TUNING CONTROLLER "test" button publisher - tuningActivateTestPublisher = nodeHandle.advertise<std_msgs::Int32>("TuningControllerService/ActivateTest", 1); - // > For the TUNING CONTOLLER "gain" sliders - tuningHorizontalGainPublisher = nodeHandle.advertise<std_msgs::Int32>("TuningControllerService/HorizontalGain", 1); - tuningVerticalGainPublisher = nodeHandle.advertise<std_msgs::Int32>("TuningControllerService/VerticalGain", 1); - tuningHeadingGainPublisher = nodeHandle.advertise<std_msgs::Int32>("TuningControllerService/HeadingGain", 1); - - - // > For the PICKER CONTROLLER - pickerButtonPressedPublisher = nodeHandle.advertise<std_msgs::Int32>("PickerControllerService/ButtonPressed", 1); - pickerZSetpointPublisher = nodeHandle.advertise<std_msgs::Float32>("PickerControllerService/ZSetpoint", 1); - pickerYawSetpointPublisher = nodeHandle.advertise<std_msgs::Float32>("PickerControllerService/YawSetpoint", 1); - pickerMassPublisher = nodeHandle.advertise<std_msgs::Float32>("PickerControllerService/Mass", 1); - pickerXAdjustmentPublisher = nodeHandle.advertise<std_msgs::Float32>("PickerControllerService/XAdjustment", 1); - pickerYAdjustmentPublisher = nodeHandle.advertise<std_msgs::Float32>("PickerControllerService/YAdjustment", 1); - pickerSetpointPublisher = nodeHandle.advertise<Setpoint>("PickerControllerService/Setpoint", 1); - pickerSetpointSubscriber = nodeHandle.subscribe("PickerControllerService/Setpoint", 1, &MainWindow::pickerSetpointCallback, this); - pickerSetpointToGUISubscriber = nodeHandle.subscribe("PickerControllerService/SetpointToGUI", 1, &MainWindow::pickerSetpointCallback, this); - - pickerButtonPressedWithSetpointPublisher = nodeHandle.advertise<SetpointV2>("PickerControllerService/ButtonPressedWithSetpoint", 1); - - // SET ALL SLIDERS AND DIALS TO DEFAULT VALUES - ui->picker_z_slider->setValue( 40 ); - ui->picker_mass_slider->setValue( 29 ); - ui->picker_yaw_dial->setValue( 0 ); - ui->picker_x_slider->setValue( 0 ); - ui->picker_y_slider->setValue( 0 ); - - // SET ALL THE FIELDS TO DEFAULT VALUES - // > For goto start - ui->picker_gotostart_x->setText("-0.30"); - ui->picker_gotostart_y->setText("+0.00"); - ui->picker_gotostart_z->setText("+0.50"); - // > For attach - ui->picker_attach_z->setText("+0.38"); - // > For pickup - ui->picker_pickup_z->setText("+0.60"); - // > For goto end - ui->picker_gotoend_x->setText("+0.30"); - ui->picker_gotoend_y->setText("+0.00"); - // > For putdown - ui->picker_putdown_z->setText("+0.39"); - // > For squat - ui->picker_squat_z->setText("+0.35"); - // > For jump - ui->picker_jump_z->setText("+0.50"); - // > For the check boxes - ui->picker_gotostart_checkBox->setChecked(1); - ui->picker_attach_checkBox->setChecked(1); - ui->picker_pickup_checkBox->setChecked(1); - ui->picker_gotoend_checkBox->setChecked(1); - ui->picker_putdown_checkBox->setChecked(1); - ui->picker_squat_checkBox->setChecked(0); - ui->picker_jump_checkBox->setChecked(0); - - - - - // subscribers - crazyRadioStatusSubscriber = nodeHandle.subscribe("CrazyRadio/CrazyRadioStatus", 1, &MainWindow::crazyRadioStatusCallback, this); - - CFBatterySubscriber = nodeHandle.subscribe("CrazyRadio/CFBattery", 1, &MainWindow::CFBatteryCallback, this); - - flyingStateSubscriber = nodeHandle.subscribe("FlyingAgentClient/flyingState", 1, &MainWindow::flyingStateChangedCallback, this); - - batteryStateSubscriber = nodeHandle.subscribe("FlyingAgentClient/batteryState", 1, &MainWindow::batteryStateChangedCallback, this); - - controllerUsedSubscriber = nodeHandle.subscribe("FlyingAgentClient/controllerUsed", 1, &MainWindow::controllerUsedChangedCallback, this); - - - safeSetpointSubscriber = nodeHandle.subscribe("SafeControllerService/Setpoint", 1, &MainWindow::safeSetpointCallback, this); - DBChangedSubscriber = nodeHandle.subscribe("/my_GUI/DBChanged", 1, &MainWindow::DBChangedCallback, this); - - ros::NodeHandle my_nodeHandle("~"); - controllerSetpointPublisher = my_nodeHandle.advertise<Setpoint>("ControllerSetpoint", 1); - - - // communication with Flying Agent Client, just to make it possible to communicate through terminal also we use FlyingAgentClient's name - //ros::NodeHandle nh_FlyingAgentClient(m_ros_namespace + "/FlyingAgentClient"); - ros::NodeHandle nh_FlyingAgentClient("FlyingAgentClient"); - crazyRadioCommandPublisher = nh_FlyingAgentClient.advertise<std_msgs::Int32>("crazyRadioCommand", 1); - FlyingAgentClientCommandPublisher = nh_FlyingAgentClient.advertise<std_msgs::Int32>("Command", 1); - - - // > For publishing a message that requests the - // YAML parameters to be re-loaded from file - // > The message contents specify which controller - // the parameters should be re-loaded for - requestLoadControllerYamlPublisher = nh_FlyingAgentClient.advertise<std_msgs::Int32>("requestLoadControllerYaml", 1); - - - // Subscriber for locking the load the controller YAML - // parameters when the Coordintor GUI requests a load - requestLoadControllerYaml_from_my_GUI_Subscriber = nodeHandle.subscribe("/my_GUI/requestLoadControllerYaml", 1, &MainWindow::requestLoadControllerYaml_from_my_GUI_Callback, this); - - // First get student ID - if(!nh_FlyingAgentClient.getParam("agentID", m_student_id)) - { - ROS_ERROR("Failed to get agentID"); - } - - // Then, Central manager - // CREATE A NODE HANDLE TO THE ROOT OF THE D-FaLL SYSTEM - ros::NodeHandle dfall_root_nodeHandle("/dfall"); - centralManager = dfall_root_nodeHandle.serviceClient<CMQuery>("CentralManagerService/Query", false); - loadCrazyflieContext(); - - - - - // Load default setpoint from the "SafeController" namespace of the "ParameterService" - std::vector<float> default_setpoint(4); - ros::NodeHandle nodeHandle_to_own_agent_parameter_service("ParameterService"); - ros::NodeHandle nodeHandle_for_safeController(nodeHandle_to_own_agent_parameter_service, "SafeController"); - - if(!nodeHandle_for_safeController.getParam("defaultSetpoint", default_setpoint)) - { - ROS_ERROR_STREAM("The StudentGUI could not find parameter 'defaultSetpoint', as called from main(...)"); - } - - // Copy the default setpoint into respective text fields of the GUI - ui->current_setpoint_x_safe->setText(QString::number(default_setpoint[0])); - ui->current_setpoint_y_safe->setText(QString::number(default_setpoint[1])); - ui->current_setpoint_z_safe->setText(QString::number(default_setpoint[2])); - ui->current_setpoint_yaw_safe->setText(QString::number(default_setpoint[3])); - - - disableGUI(); - highlightSafeControllerTab(); - - // INITIALISE THE BATTERY STATE AS NORMAL - m_battery_state = BATTERY_STATE_NORMAL; - - // SET THE BATTERY VOLTAGE FIELD TO BE BLANK - QString qstr = "-.-- V"; - ui->voltage_field->setText(qstr); - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - QPixmap battery_unknown_pixmap(":/images/battery_unknown.png"); - ui->battery_status_label->setPixmap(battery_unknown_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_UNKNOWN; - - // SET THE IMAGE FOR THE CRAZY RADIO STATUS LABEL - QPixmap rf_disconnected_pixmap(":/images/rf_disconnected.png"); - ui->rf_status_label->setPixmap(rf_disconnected_pixmap); - ui->rf_status_label->setScaledContents(true); - - // SET THE IMAGE FOR THE FLYING STATE LABEL - QPixmap flying_state_off_pixmap(":/images/flying_state_off.png"); - ui->flying_state_label->setPixmap(flying_state_off_pixmap); - ui->flying_state_label->setScaledContents(true); - - - - //QPixmap battery_80_pixmap(":/images/battery_80.png"); - //m_battery_80_pixmap = battery_80_pixmap.scaled(50,70,Qt::IgnoreAspectRatio); - // The syntax for "scaled" is (int width, int height, ...) - - - ui->error_label->setStyleSheet("QLabel { color : red; }"); - ui->error_label->clear(); - - // Add keyboard shortcuts - // > for "all motors off", press the space bar - ui->motors_OFF_button->setShortcut(tr("Space")); - // > for "kill GUI node", press "CTRL+C" while the GUI window is the focus - m_close_GUI_shortcut = new QShortcut(QKeySequence(tr("CTRL+C")), this, SLOT(close())); - - - initialize_demo_setpoint(); - initialize_student_setpoint(); - initialize_mpc_setpoint(); - initialize_picker_setpoint(); -} - - -MainWindow::~MainWindow() -{ - delete ui; -} - -void MainWindow::disableGUI() -{ - ui->motors_OFF_button->setEnabled(false); - ui->take_off_button->setEnabled(false); - ui->land_button->setEnabled(false); -} - -void MainWindow::enableGUI() -{ - ui->motors_OFF_button->setEnabled(true); - if(m_battery_state == BATTERY_STATE_NORMAL) - { - ui->take_off_button->setEnabled(true); - ui->land_button->setEnabled(true); - } -} - -void MainWindow::highlightSafeControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightPickerControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightDemoControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightStudentControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightMpcControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightRemoteControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::green); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::black); -} -void MainWindow::highlightTuningControllerTab() -{ - ui->tabWidget->tabBar()->setTabTextColor(0, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(1, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(2, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(3, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(4, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(5, Qt::black); - ui->tabWidget->tabBar()->setTabTextColor(6, Qt::green); -} - - -void MainWindow::DBChangedCallback(const std_msgs::Int32& msg) -{ - loadCrazyflieContext(); - ROS_INFO("context reloaded in student_GUI"); -} - -void MainWindow::controllerUsedChangedCallback(const std_msgs::Int32& msg) -{ - switch(msg.data) - { - case SAFE_CONTROLLER: - highlightSafeControllerTab(); - break; - case DEMO_CONTROLLER: - highlightDemoControllerTab(); - break; - case STUDENT_CONTROLLER: - highlightStudentControllerTab(); - break; - case MPC_CONTROLLER: - highlightMpcControllerTab(); - break; - case REMOTE_CONTROLLER: - highlightRemoteControllerTab(); - break; - case TUNING_CONTROLLER: - highlightTuningControllerTab(); - break; - case PICKER_CONTROLLER: - highlightPickerControllerTab(); - break; - default: - break; - } -} - -void MainWindow::safeSetpointCallback(const Setpoint& newSetpoint) -{ - m_safe_setpoint = newSetpoint; - // here we get the new setpoint, need to update it in GUI - ui->current_setpoint_x_safe->setText(QString::number(newSetpoint.x, 'f', 3)); - ui->current_setpoint_y_safe->setText(QString::number(newSetpoint.y, 'f', 3)); - ui->current_setpoint_z_safe->setText(QString::number(newSetpoint.z, 'f', 3)); - ui->current_setpoint_yaw_safe->setText(QString::number(newSetpoint.yaw * RAD2DEG, 'f', 1)); -} - -void MainWindow::demoSetpointCallback(const Setpoint& newSetpoint) -{ - m_demo_setpoint = newSetpoint; - // here we get the new setpoint, need to update it in GUI - ui->current_setpoint_x_demo->setText(QString::number(newSetpoint.x, 'f', 3)); - ui->current_setpoint_y_demo->setText(QString::number(newSetpoint.y, 'f', 3)); - ui->current_setpoint_z_demo->setText(QString::number(newSetpoint.z, 'f', 3)); - ui->current_setpoint_yaw_demo->setText(QString::number(newSetpoint.yaw * RAD2DEG, 'f', 1)); -} - -void MainWindow::studentSetpointCallback(const Setpoint& newSetpoint) -{ - m_student_setpoint = newSetpoint; - // here we get the new setpoint, need to update it in GUI - ui->current_setpoint_x_student->setText(QString::number(newSetpoint.x, 'f', 3)); - ui->current_setpoint_y_student->setText(QString::number(newSetpoint.y, 'f', 3)); - ui->current_setpoint_z_student->setText(QString::number(newSetpoint.z, 'f', 3)); - ui->current_setpoint_yaw_student->setText(QString::number(newSetpoint.yaw * RAD2DEG, 'f', 1)); -} - -void MainWindow::mpcSetpointCallback(const Setpoint& newSetpoint) -{ - m_mpc_setpoint = newSetpoint; - // here we get the new setpoint, need to update it in GUI - ui->current_setpoint_x_mpc->setText(QString::number(newSetpoint.x, 'f', 3)); - ui->current_setpoint_y_mpc->setText(QString::number(newSetpoint.y, 'f', 3)); - ui->current_setpoint_z_mpc->setText(QString::number(newSetpoint.z, 'f', 3)); - ui->current_setpoint_yaw_mpc->setText(QString::number(newSetpoint.yaw * RAD2DEG, 'f', 1)); -} - -void MainWindow::pickerSetpointCallback(const Setpoint& newSetpoint) -{ - m_picker_setpoint = newSetpoint; - // here we get the new setpoint, need to update it in GUI - ui->picker_z_slider->setValue( int(newSetpoint.z*100.0) ); - ui->picker_yaw_dial->setValue( int(newSetpoint.yaw * RAD2DEG) ); - -} - -void MainWindow::flyingStateChangedCallback(const std_msgs::Int32& msg) -{ - // PUT THE CURRENT STATE INTO THE CLASS VARIABLE - m_flying_state_mutex.lock(); - m_flying_state = msg.data; - m_flying_state_mutex.unlock(); - - // UPDATE THE LABEL TO DISPLAY THE FLYING STATE - //QString qstr = "Flying State: "; - switch(msg.data) - { - case STATE_MOTORS_OFF: - { - //qstr.append("Motors OFF"); - // SET THE APPROPRIATE IMAGE FOR THE FLYING STATE LABEL - ui->flying_state_label->clear(); - QPixmap flying_state_off_pixmap(":/images/flying_state_off.png"); - ui->flying_state_label->setPixmap(flying_state_off_pixmap); - ui->flying_state_label->setScaledContents(true); - ui->flying_state_label->update(); - break; - } - - case STATE_TAKE_OFF: - { - //qstr.append("Take OFF"); - // SET THE APPROPRIATE IMAGE FOR THE FLYING STATE LABEL - ui->flying_state_label->clear(); - QPixmap flying_state_enabling_pixmap(":/images/flying_state_enabling.png"); - ui->flying_state_label->setPixmap(flying_state_enabling_pixmap); - ui->flying_state_label->setScaledContents(true); - ui->flying_state_label->update(); - break; - } - - case STATE_FLYING: - { - //qstr.append("Flying"); - // SET THE APPROPRIATE IMAGE FOR THE FLYING STATE LABEL - ui->flying_state_label->clear(); - QPixmap flying_state_flying_pixmap(":/images/flying_state_flying.png"); - ui->flying_state_label->setPixmap(flying_state_flying_pixmap); - ui->flying_state_label->setScaledContents(true); - ui->flying_state_label->update(); - break; - } - - case STATE_LAND: - { - //qstr.append("Land"); - // SET THE APPROPRIATE IMAGE FOR THE FLYING STATE LABEL - ui->flying_state_label->clear(); - QPixmap flying_state_disabling_pixmap(":/images/flying_state_disabling.png"); - ui->flying_state_label->setPixmap(flying_state_disabling_pixmap); - ui->flying_state_label->setScaledContents(true); - ui->flying_state_label->update(); - break; - } - - default: - { - // SET THE APPROPRIATE IMAGE FOR THE FLYING STATE LABEL - ui->flying_state_label->clear(); - QPixmap flying_state_unknown_pixmap(":/images/flying_state_unknown.png"); - ui->flying_state_label->setPixmap(flying_state_unknown_pixmap); - ui->flying_state_label->setScaledContents(true); - ui->flying_state_label->update(); - break; - } - } - //ui->flying_state_label->setText(qstr); -} - -void MainWindow::batteryStateChangedCallback(const std_msgs::Int32& msg) -{ - // switch case with unabling buttons motors off, take off, etc... when battery is low - QString qstr = ""; - switch(msg.data) - { - case BATTERY_STATE_LOW: - { - // DISABLE THE TAKE OFF AND LAND BUTTONS - ui->take_off_button->setEnabled(false); - ui->land_button->setEnabled(false); - // ui->groupBox_4->setEnabled(false); - - // SET THE CLASS VARIABLE FOR TRACKING THE BATTERY STATE - m_battery_state = BATTERY_STATE_LOW; - break; - } - - case BATTERY_STATE_NORMAL: - { - // ui->groupBox_4->setEnabled(true); - ui->take_off_button->setEnabled(true); - ui->land_button->setEnabled(true); - - // SET THE CLASS VARIABLE FOR TRACKING THE BATTERY STATE - m_battery_state = BATTERY_STATE_NORMAL; - break; - } - - default: - break; - } -} - - -void MainWindow::setCrazyRadioStatus(int radio_status) -{ - // add more things whenever the status is changed - switch(radio_status) - { - case CONNECTED: - { - // SET THE APPROPRIATE IMAGE FOR THE RADIOSTATUS LABEL - rf_status_label_mutex.lock(); - //ui->rf_status_label->clear(); - QPixmap rf_connected_pixmap(":/images/rf_connected.png"); - ui->rf_status_label->setPixmap(rf_connected_pixmap); - ui->rf_status_label->setScaledContents(true); - //ui->rf_status_label->update(); - rf_status_label_mutex.unlock(); - // ENABLE THE REMAINDER OF THE GUI - enableGUI(); - break; - } - - case CONNECTING: - { - // SET THE APPROPRIATE IMAGE FOR THE RADIO STATUS LABEL - rf_status_label_mutex.lock(); - //ui->rf_status_label->clear(); - QPixmap rf_connecting_pixmap(":/images/rf_connecting.png"); - ui->rf_status_label->setPixmap(rf_connecting_pixmap); - ui->rf_status_label->setScaledContents(true); - //ui->rf_status_label->update(); - rf_status_label_mutex.unlock(); - break; - } - - case DISCONNECTED: - { - // SET THE APPROPRIATE IMAGE FOR THE RADIO STATUS LABEL - rf_status_label_mutex.lock(); - //ui->rf_status_label->clear(); - QPixmap rf_disconnected_pixmap(":/images/rf_disconnected.png"); - ui->rf_status_label->setPixmap(rf_disconnected_pixmap); - ui->rf_status_label->setScaledContents(true); - //ui->rf_status_label->update(); - rf_status_label_mutex.unlock(); - // SET THE BATTERY VOLTAGE FIELD TO BE BLANK - QString qstr = "-.-- V"; - voltage_field_mutex.lock(); - ui->voltage_field->setText(qstr); - voltage_field_mutex.unlock(); - // SET THE APPROPRIATE IMAGE FOR THE BATTERY STATUS LABEL - battery_status_label_mutex.lock(); - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_UNKNOWN) - { - ui->battery_status_label->clear(); - QPixmap battery_unknown_pixmap(":/images/battery_unknown.png"); - ui->battery_status_label->setPixmap(battery_unknown_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_UNKNOWN; - ui->battery_status_label->update(); - } - battery_status_label_mutex.unlock(); - // DISABLE THE REMAINDER OF THE GUI - disableGUI(); - break; - } - - default: - { - ROS_ERROR_STREAM("unexpected radio status: " << m_radio_status); - break; - } - } - this->m_radio_status = radio_status; -} - - - - -float MainWindow::fromVoltageToPercent(float voltage) -{ - // INITIALISE THE LOCAL VARIABLE FOR THE VOLTAGE WHEN FULL/EMPTY - float voltage_when_full; - float voltage_when_empty; - - // COMPUTE THE PERCENTAGE DIFFERENTLY DEPENDING ON - // THE CURRENT FLYING STATE - m_flying_state_mutex.lock(); - if (m_flying_state == STATE_MOTORS_OFF) - { - voltage_when_empty = battery_voltage_empty_while_motors_off; - voltage_when_full = battery_voltage_full_while_motors_off; - } - else - { - voltage_when_empty = battery_voltage_empty_while_flying; - voltage_when_full = battery_voltage_full_while_flying; - } - m_flying_state_mutex.unlock(); - //voltage_when_empty = battery_voltage_empty_while_motors_off; - //voltage_when_full = battery_voltage_full_while_motors_off; - - // COMPUTE THE PERCENTAGE - float percentage = 100.0f * (voltage-voltage_when_empty)/(voltage_when_full-voltage_when_empty); - - - // CLIP THE PERCENTAGE TO BE BETWEEN [0,100] - // > This should not happen to often - if(percentage > 100.0f) - { - percentage = 100.0f; - } - if(percentage < 0.0f) - { - percentage = 0.0f; - } - - return percentage; -} - -void MainWindow::updateBatteryVoltage(float battery_voltage) -{ - // PUT THE VOLTAGE INTO THE CLASS VARIABLES - m_battery_voltage = battery_voltage; - - // UPDATE THE BATTERY VOLTAGE FIELD - voltage_field_mutex.lock(); - QString qstr = ""; - qstr.append(QString::number(battery_voltage, 'f', 2)); - qstr.append(" V"); - ui->voltage_field->setText(qstr); - voltage_field_mutex.unlock(); - - // COMPUTE THE BATTERY VOLTAGE AS A PERCENTAGE - float battery_voltage_percentage = fromVoltageToPercent(battery_voltage); - - //ROS_INFO_STREAM("Battery percentage = " << battery_voltage_percentage ); - - // UPDATE THE IMAGE DISPLAYED IN THE BATTERY VOLTAGE LABEL IMAGE - battery_status_label_mutex.lock(); - switch(m_battery_state) - { - // WHEN THE BATTERY IS IN A LOW STATE - case BATTERY_STATE_LOW: - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_EMPTY) - { - ui->battery_status_label->clear(); - QPixmap battery_empty_pixmap(":/images/battery_empty.png"); - ui->battery_status_label->setPixmap(battery_empty_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_EMPTY; - ui->battery_status_label->update(); - } - break; - } - - // WHEN THE BATTERY IS IN A NORMAL STATE - case BATTERY_STATE_NORMAL: - { - - if ( - ((m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_EMPTY) && (battery_voltage_percentage <= 0.0f)) - || - ((m_battery_label_image_current_index == BATTERY_LABEL_IMAGE_INDEX_EMPTY) && (battery_voltage_percentage <= 2.0f)) - ) - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_EMPTY) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_empty_pixmap(":/images/battery_empty.png"); - ui->battery_status_label->setPixmap(battery_empty_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_EMPTY; - ui->battery_status_label->update(); - } - } - else if ( - ((m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_20) && (battery_voltage_percentage <= 20.0f)) - || - ((m_battery_label_image_current_index == BATTERY_LABEL_IMAGE_INDEX_20) && (battery_voltage_percentage <= 22.0f)) - ) - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_20) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_20_pixmap(":/images/battery_20.png"); - ui->battery_status_label->setPixmap(battery_20_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_20; - ui->battery_status_label->update(); - } - } - else if ( - ((m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_40) && (battery_voltage_percentage <= 40.0f)) - || - ((m_battery_label_image_current_index == BATTERY_LABEL_IMAGE_INDEX_40) && (battery_voltage_percentage <= 42.0f)) - ) - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_40) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_40_pixmap(":/images/battery_40.png"); - ui->battery_status_label->setPixmap(battery_40_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_40; - ui->battery_status_label->update(); - } - } - else if ( - ((m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_60) && (battery_voltage_percentage <= 60.0f)) - || - ((m_battery_label_image_current_index == BATTERY_LABEL_IMAGE_INDEX_60) && (battery_voltage_percentage <= 62.0f)) - ) - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_60) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_60_pixmap(":/images/battery_60.png"); - ui->battery_status_label->setPixmap(battery_60_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_60; - ui->battery_status_label->update(); - } - } - else if ( - ((m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_80) && (battery_voltage_percentage <= 80.0f)) - || - ((m_battery_label_image_current_index == BATTERY_LABEL_IMAGE_INDEX_80) && (battery_voltage_percentage <= 82.0f)) - ) - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_80) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_80_pixmap(":/images/battery_80.png"); - ui->battery_status_label->setPixmap(battery_80_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_80; - ui->battery_status_label->update(); - } - } - else - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_FULL) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_full_pixmap(":/images/battery_full.png"); - ui->battery_status_label->setPixmap(battery_full_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_FULL; - ui->battery_status_label->update(); - } - } - break; - } - - default: - { - if (m_battery_label_image_current_index != BATTERY_LABEL_IMAGE_INDEX_UNKNOWN) - { - // SET THE IMAGE FOR THE BATTERY STATUS LABEL - ui->battery_status_label->clear(); - QPixmap battery_unknown_pixmap(":/images/battery_unknown.png"); - ui->battery_status_label->setPixmap(battery_unknown_pixmap); - ui->battery_status_label->setScaledContents(true); - m_battery_label_image_current_index = BATTERY_LABEL_IMAGE_INDEX_UNKNOWN; - ui->battery_status_label->update(); - } - break; - } - } - battery_status_label_mutex.unlock(); -} - -void MainWindow::CFBatteryCallback(const std_msgs::Float32& msg) -{ - updateBatteryVoltage(msg.data); -} - -void MainWindow::crazyRadioStatusCallback(const std_msgs::Int32& msg) -{ - ROS_INFO("[Student GUI] Callback CrazyRadioStatus called"); - this->setCrazyRadioStatus(msg.data); -} - -void MainWindow::loadCrazyflieContext() -{ - CMQuery contextCall; - contextCall.request.studentID = m_student_id; - ROS_INFO_STREAM("StudentID:" << m_student_id); - - centralManager.waitForExistence(ros::Duration(-1)); - - if(centralManager.call(contextCall)) - { - m_context = contextCall.response.crazyflieContext; - ROS_INFO_STREAM("CrazyflieContext:\n" << m_context); - // we now have the m_context variable with the current context. Put CF Name in label - - QString qstr = "StudentID "; - qstr.append(QString::number(m_student_id)); - qstr.append(" connected to CF "); - qstr.append(QString::fromStdString(m_context.crazyflieName)); - ui->groupBox->setTitle(qstr); - } - else - { - ROS_ERROR("Failed to load context"); - } - - ros::NodeHandle nh("CrazyRadio"); - nh.setParam("crazyFlieAddress", m_context.crazyflieAddress); -} - -void MainWindow::coordinatesToLocal(CrazyflieData& cf) -{ - AreaBounds area = m_context.localArea; - float originX = (area.xmin + area.xmax) / 2.0; - float originY = (area.ymin + area.ymax) / 2.0; - // change Z origin to zero, i.e., to the table height, zero of global coordinates, instead of middle of the box - float originZ = 0.0; - // float originZ = (area.zmin + area.zmax) / 2.0; - - cf.x -= originX; - cf.y -= originY; - cf.z -= originZ; -} - - -void MainWindow::updateNewViconData(const ptrToMessage& p_msg) //connected to newViconData, from node -{ - for(std::vector<CrazyflieData>::const_iterator it = p_msg->crazyflies.begin(); it != p_msg->crazyflies.end(); ++it) - { - CrazyflieData global = *it; - if(global.crazyflieName == m_context.crazyflieName) - { - CrazyflieData local = global; - coordinatesToLocal(local); - - // now we have the local coordinates, put them in the labels - ui->current_x_safe->setText(QString::number(local.x, 'f', 3)); - ui->current_y_safe->setText(QString::number(local.y, 'f', 3)); - ui->current_z_safe->setText(QString::number(local.z, 'f', 3)); - ui->current_yaw_safe->setText(QString::number(local.yaw * RAD2DEG, 'f', 1)); - ui->current_pitch_safe->setText(QString::number(local.pitch * RAD2DEG, 'f', 1)); - ui->current_roll_safe->setText(QString::number(local.roll * RAD2DEG, 'f', 1)); - - ui->current_x_demo->setText(QString::number(local.x, 'f', 3)); - ui->current_y_demo->setText(QString::number(local.y, 'f', 3)); - ui->current_z_demo->setText(QString::number(local.z, 'f', 3)); - ui->current_yaw_demo->setText(QString::number(local.yaw * RAD2DEG, 'f', 1)); - ui->current_pitch_demo->setText(QString::number(local.pitch * RAD2DEG, 'f', 1)); - ui->current_roll_demo->setText(QString::number(local.roll * RAD2DEG, 'f', 1)); - - ui->current_x_student->setText(QString::number(local.x, 'f', 3)); - ui->current_y_student->setText(QString::number(local.y, 'f', 3)); - ui->current_z_student->setText(QString::number(local.z, 'f', 3)); - ui->current_yaw_student->setText(QString::number(local.yaw * RAD2DEG, 'f', 1)); - ui->current_pitch_student->setText(QString::number(local.pitch * RAD2DEG, 'f', 1)); - ui->current_roll_student->setText(QString::number(local.roll * RAD2DEG, 'f', 1)); - - // also update diff - ui->diff_x_safe->setText(QString::number(m_safe_setpoint.x - local.x, 'f', 3)); - ui->diff_y_safe->setText(QString::number(m_safe_setpoint.y - local.y, 'f', 3)); - ui->diff_z_safe->setText(QString::number(m_safe_setpoint.z - local.z, 'f', 3)); - ui->diff_yaw_safe->setText(QString::number((m_safe_setpoint.yaw - local.yaw) * RAD2DEG, 'f', 1)); - - ui->diff_x_demo->setText(QString::number(m_demo_setpoint.x - local.x, 'f', 3)); - ui->diff_y_demo->setText(QString::number(m_demo_setpoint.y - local.y, 'f', 3)); - ui->diff_z_demo->setText(QString::number(m_demo_setpoint.z - local.z, 'f', 3)); - ui->diff_yaw_demo->setText(QString::number((m_demo_setpoint.yaw - local.yaw) * RAD2DEG, 'f', 1)); - - ui->diff_x_student->setText(QString::number(m_student_setpoint.x - local.x, 'f', 3)); - ui->diff_y_student->setText(QString::number(m_student_setpoint.y - local.y, 'f', 3)); - ui->diff_z_student->setText(QString::number(m_student_setpoint.z - local.z, 'f', 3)); - ui->diff_yaw_student->setText(QString::number((m_student_setpoint.yaw - local.yaw) * RAD2DEG, 'f', 1)); - } - } -} - - - -// ---------------------------------------------------------------------------------- -// # RF Crazyradio Connect Disconnect -void MainWindow::on_RF_Connect_button_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_RECONNECT; - this->crazyRadioCommandPublisher.publish(msg); - ROS_INFO("command reconnect published"); -} - -void MainWindow::on_RF_disconnect_button_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_DISCONNECT; - this->crazyRadioCommandPublisher.publish(msg); - ROS_INFO("command disconnect published"); -} - - - -// ---------------------------------------------------------------------------------- -// # Take off, lanf, motors off -void MainWindow::on_take_off_button_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_CRAZYFLY_TAKE_OFF; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_land_button_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_CRAZYFLY_LAND; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_motors_OFF_button_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_CRAZYFLY_MOTORS_OFF; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - - - -// ---------------------------------------------------------------------------------- -// # Setpoint -void MainWindow::on_set_setpoint_button_safe_clicked() -{ - Setpoint msg_setpoint; - - // initialize setpoint to previous one - - msg_setpoint.x = (ui->current_setpoint_x_safe->text()).toFloat(); - msg_setpoint.y = (ui->current_setpoint_y_safe->text()).toFloat(); - msg_setpoint.z = (ui->current_setpoint_z_safe->text()).toFloat(); - msg_setpoint.yaw = (ui->current_setpoint_yaw_safe->text()).toFloat(); - - if(!ui->new_setpoint_x_safe->text().isEmpty()) - msg_setpoint.x = (ui->new_setpoint_x_safe->text()).toFloat(); - - if(!ui->new_setpoint_y_safe->text().isEmpty()) - msg_setpoint.y = (ui->new_setpoint_y_safe->text()).toFloat(); - - if(!ui->new_setpoint_z_safe->text().isEmpty()) - msg_setpoint.z = (ui->new_setpoint_z_safe->text()).toFloat(); - - if(!ui->new_setpoint_yaw_safe->text().isEmpty()) - msg_setpoint.yaw = (ui->new_setpoint_yaw_safe->text()).toFloat() * DEG2RAD; - - - if(!setpointInsideBox(msg_setpoint, m_context)) - { - ROS_INFO("Corrected setpoint, was out of bounds"); - - // correct the setpoint given the box size - msg_setpoint = correctSetpointBox(msg_setpoint, m_context); - ui->error_label->setText("Setpoint is outside safety box"); - } - else - { - ui->error_label->clear(); - } - - this->controllerSetpointPublisher.publish(msg_setpoint); - - ROS_INFO_STREAM("Setpoint change clicked with:" << msg_setpoint.x << ", "<< msg_setpoint.y << ", "<< msg_setpoint.z << ", "<< msg_setpoint.yaw); -} - -void MainWindow::initialize_demo_setpoint() -{ - Setpoint msg_setpoint; - msg_setpoint.x = 0; - msg_setpoint.y = 0; - msg_setpoint.z = 0.4; - msg_setpoint.yaw = 0; - - this->demoSetpointPublisher.publish(msg_setpoint); -} - -void MainWindow::initialize_student_setpoint() -{ - Setpoint msg_setpoint; - msg_setpoint.x = 0; - msg_setpoint.y = 0; - msg_setpoint.z = 0.4; - msg_setpoint.yaw = 0; - - this->studentSetpointPublisher.publish(msg_setpoint); -} - -void MainWindow::initialize_mpc_setpoint() -{ - Setpoint msg_setpoint; - msg_setpoint.x = 0; - msg_setpoint.y = 0; - msg_setpoint.z = 0.4; - msg_setpoint.yaw = 0; - - this->mpcSetpointPublisher.publish(msg_setpoint); -} - -void MainWindow::initialize_picker_setpoint() -{ - Setpoint msg_setpoint; - msg_setpoint.x = 0; - msg_setpoint.y = 0; - msg_setpoint.z = 0.4; - msg_setpoint.yaw = 0; - - this->pickerSetpointPublisher.publish(msg_setpoint); -} - -void MainWindow::on_set_setpoint_button_demo_clicked() -{ - Setpoint msg_setpoint; - - msg_setpoint.x = (ui->current_setpoint_x_demo->text()).toFloat(); - msg_setpoint.y = (ui->current_setpoint_y_demo->text()).toFloat(); - msg_setpoint.z = (ui->current_setpoint_z_demo->text()).toFloat(); - msg_setpoint.yaw = (ui->current_setpoint_yaw_demo->text()).toFloat(); - - if(!ui->new_setpoint_x_demo->text().isEmpty()) - msg_setpoint.x = (ui->new_setpoint_x_demo->text()).toFloat(); - if(!ui->new_setpoint_y_demo->text().isEmpty()) - msg_setpoint.y = (ui->new_setpoint_y_demo->text()).toFloat(); - if(!ui->new_setpoint_z_demo->text().isEmpty()) - msg_setpoint.z = (ui->new_setpoint_z_demo->text()).toFloat(); - if(!ui->new_setpoint_yaw_demo->text().isEmpty()) - msg_setpoint.yaw = (ui->new_setpoint_yaw_demo->text()).toFloat() * DEG2RAD; - - this->demoSetpointPublisher.publish(msg_setpoint); - - ROS_INFO_STREAM("Setpoint change clicked with:" << msg_setpoint.x << ", "<< msg_setpoint.y << ", "<< msg_setpoint.z << ", "<< msg_setpoint.yaw); -} - -void MainWindow::on_set_setpoint_button_student_clicked() -{ - Setpoint msg_setpoint; - - msg_setpoint.x = (ui->current_setpoint_x_student->text()).toFloat(); - msg_setpoint.y = (ui->current_setpoint_y_student->text()).toFloat(); - msg_setpoint.z = (ui->current_setpoint_z_student->text()).toFloat(); - msg_setpoint.yaw = (ui->current_setpoint_yaw_student->text()).toFloat(); - - if(!ui->new_setpoint_x_student->text().isEmpty()) - msg_setpoint.x = (ui->new_setpoint_x_student->text()).toFloat(); - if(!ui->new_setpoint_y_student->text().isEmpty()) - msg_setpoint.y = (ui->new_setpoint_y_student->text()).toFloat(); - if(!ui->new_setpoint_z_student->text().isEmpty()) - msg_setpoint.z = (ui->new_setpoint_z_student->text()).toFloat(); - if(!ui->new_setpoint_yaw_student->text().isEmpty()) - msg_setpoint.yaw = (ui->new_setpoint_yaw_student->text()).toFloat() * DEG2RAD; - - this->studentSetpointPublisher.publish(msg_setpoint); - - ROS_INFO_STREAM("Setpoint change clicked with:" << msg_setpoint.x << ", "<< msg_setpoint.y << ", "<< msg_setpoint.z << ", "<< msg_setpoint.yaw); -} - -void MainWindow::on_set_setpoint_button_mpc_clicked() -{ - Setpoint msg_setpoint; - - msg_setpoint.x = (ui->current_setpoint_x_mpc->text()).toFloat(); - msg_setpoint.y = (ui->current_setpoint_y_mpc->text()).toFloat(); - msg_setpoint.z = (ui->current_setpoint_z_mpc->text()).toFloat(); - msg_setpoint.yaw = (ui->current_setpoint_yaw_mpc->text()).toFloat(); - - if(!ui->new_setpoint_x_mpc->text().isEmpty()) - msg_setpoint.x = (ui->new_setpoint_x_mpc->text()).toFloat(); - if(!ui->new_setpoint_y_mpc->text().isEmpty()) - msg_setpoint.y = (ui->new_setpoint_y_mpc->text()).toFloat(); - if(!ui->new_setpoint_z_mpc->text().isEmpty()) - msg_setpoint.z = (ui->new_setpoint_z_mpc->text()).toFloat(); - if(!ui->new_setpoint_yaw_mpc->text().isEmpty()) - msg_setpoint.yaw = (ui->new_setpoint_yaw_mpc->text()).toFloat() * DEG2RAD; - - this->mpcSetpointPublisher.publish(msg_setpoint); - - ROS_INFO_STREAM("Setpoint change clicked with:" << msg_setpoint.x << ", "<< msg_setpoint.y << ", "<< msg_setpoint.z << ", "<< msg_setpoint.yaw); -} - - -// ---------------------------------------------------------------------------------- -// # Load Yaml when acting as the GUI for an Agent -void MainWindow::on_load_safe_yaml_button_clicked() -{ - // Set the "load safe yaml" button to be disabled - ui->load_safe_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the safe controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_SAFE_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("Request load of safe controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_safe_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::safeYamlFileTimerCallback, this, true); -} - -void MainWindow::safeYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load safe yaml" button again - ui->load_safe_yaml_button->setEnabled(true); -} - - - -void MainWindow::on_load_demo_yaml_button_clicked() -{ - // Set the "load demo yaml" button to be disabled - ui->load_demo_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the demo controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_DEMO_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("Request load of demo controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_demo_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::demoYamlFileTimerCallback, this, true); -} - -void MainWindow::demoYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load demo yaml" button again - ui->load_demo_yaml_button->setEnabled(true); -} - - - -void MainWindow::on_load_student_yaml_button_clicked() -{ - // Set the "load student yaml" button to be disabled - ui->load_student_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the student controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_STUDENT_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("Request load of student controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_student_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::studentYamlFileTimerCallback, this, true); -} - -void MainWindow::studentYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load student yaml" button again - ui->load_student_yaml_button->setEnabled(true); -} - - - -void MainWindow::on_load_mpc_yaml_button_clicked() -{ - // Set the "load mpc yaml" button to be disabled - ui->load_mpc_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the mpc controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_MPC_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("Request load of mpc controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_mpc_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::mpcYamlFileTimerCallback, this, true); -} - -void MainWindow::mpcYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load mpc yaml" button again - ui->load_mpc_yaml_button->setEnabled(true); -} - - - - -void MainWindow::on_load_remote_yaml_button_clicked() -{ - // Set the "load remote yaml" button to be disabled - ui->load_remote_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the remote controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_REMOTE_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("[STUDENT GUI] Request load of remote controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_remote_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::remoteYamlFileTimerCallback, this, true); -} - -void MainWindow::remoteYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load remote yaml" button again - ui->load_remote_yaml_button->setEnabled(true); -} - - - -void MainWindow::on_load_tuning_yaml_button_clicked() -{ - // Set the "load tuning yaml" button to be disabled - ui->load_tuning_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the tuning controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_TUNING_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("[STUDENT GUI] Request load of tuning controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_tuning_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::tuningYamlFileTimerCallback, this, true); -} - -void MainWindow::tuningYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load tuning yaml" button again - ui->load_tuning_yaml_button->setEnabled(true); -} - - - -void MainWindow::on_load_picker_yaml_button_clicked() -{ - // Set the "load picker yaml" button to be disabled - ui->load_picker_yaml_button->setEnabled(false); - - // Send a message requesting the parameters from the YAML - // file to be reloaded for the picker controller - std_msgs::Int32 msg; - msg.data = LOAD_YAML_PICKER_CONTROLLER_AGENT; - this->requestLoadControllerYamlPublisher.publish(msg); - ROS_INFO("[STUDENT GUI] Request load of picker controller YAML published"); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - ros::NodeHandle nodeHandle("~"); - m_timer_yaml_file_for_picker_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::pickerYamlFileTimerCallback, this, true); -} - -void MainWindow::pickerYamlFileTimerCallback(const ros::TimerEvent&) -{ - // Enble the "load picker yaml" button again - ui->load_picker_yaml_button->setEnabled(true); -} - - -void MainWindow::requestLoadControllerYaml_from_my_GUI_Callback(const std_msgs::Int32& msg) -{ - // Extract from the "msg" for which controller the YAML - // parameters should be loaded - int controller_to_load_yaml = msg.data; - - // Create the "nodeHandle" needed in the switch cases below - ros::NodeHandle nodeHandle("~"); - - // Switch between loading for the different controllers - switch(controller_to_load_yaml) - { - case LOAD_YAML_SAFE_CONTROLLER_AGENT: - case LOAD_YAML_SAFE_CONTROLLER_COORDINATOR: - // Set the "load safe yaml" button to be disabled - ui->load_safe_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_safe_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::safeYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_DEMO_CONTROLLER_AGENT: - case LOAD_YAML_DEMO_CONTROLLER_COORDINATOR: - // Set the "load demo yaml" button to be disabled - ui->load_demo_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_demo_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::demoYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_STUDENT_CONTROLLER_AGENT: - case LOAD_YAML_STUDENT_CONTROLLER_COORDINATOR: - // Set the "load student yaml" button to be disabled - ui->load_student_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_student_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::studentYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_MPC_CONTROLLER_AGENT: - case LOAD_YAML_MPC_CONTROLLER_COORDINATOR: - // Set the "load mpc yaml" button to be disabled - ui->load_mpc_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_mpc_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::mpcYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_REMOTE_CONTROLLER_AGENT: - case LOAD_YAML_REMOTE_CONTROLLER_COORDINATOR: - // Set the "load remote yaml" button to be disabled - ui->load_remote_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_remote_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::remoteYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_TUNING_CONTROLLER_AGENT: - case LOAD_YAML_TUNING_CONTROLLER_COORDINATOR: - // Set the "load tuning yaml" button to be disabled - ui->load_tuning_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_tuning_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::tuningYamlFileTimerCallback, this, true); - - break; - - case LOAD_YAML_PICKER_CONTROLLER_AGENT: - case LOAD_YAML_PICKER_CONTROLLER_COORDINATOR: - // Set the "load picker yaml" button to be disabled - ui->load_picker_yaml_button->setEnabled(false); - - // Start a timer which will enable the button in its callback - // > This is required because the agent node waits some time between - // re-loading the values from the YAML file and then assigning then - // to the local variable of the agent. - // > Thus we use this timer to prevent the user from clicking the - // button in the GUI repeatedly. - m_timer_yaml_file_for_picker_controller = nodeHandle.createTimer(ros::Duration(1.5), &MainWindow::pickerYamlFileTimerCallback, this, true); - - break; - - default: - ROS_INFO("Unknown 'all controllers to load yaml' command, thus nothing will be disabled"); - break; - } -} - - - - - -// # Enable controllers -void MainWindow::on_enable_safe_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_SAFE_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_demo_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_DEMO_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_student_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_STUDENT_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_mpc_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_MPC_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_remote_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_REMOTE_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_tuning_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_TUNING_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - -void MainWindow::on_enable_picker_controller_clicked() -{ - std_msgs::Int32 msg; - msg.data = CMD_USE_PICKER_CONTROLLER; - this->FlyingAgentClientCommandPublisher.publish(msg); -} - - - -// # Custom command buttons - FOR DEMO CONTROLLER -void MainWindow::on_demoButton_1_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 1; - msg_custom_button.command_code = 0; - this->demoCustomButtonPublisher.publish(msg_custom_button); - - ROS_INFO("Demo button 1 pressed in GUI"); -} - -void MainWindow::on_demoButton_2_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 2; - msg_custom_button.command_code = 0; - this->demoCustomButtonPublisher.publish(msg_custom_button); - ROS_INFO("Demo button 2 pressed in GUI"); -} - -void MainWindow::on_demoButton_3_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 3; - msg_custom_button.command_code = (ui->demoField_3->text()).toFloat(); - this->demoCustomButtonPublisher.publish(msg_custom_button); - ROS_INFO("Demo button 3 pressed in GUI"); -} - - - - - -// # Custom command buttons - FOR STUDENT CONTROLLER -void MainWindow::on_studentButton_1_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 1; - msg_custom_button.command_code = 0; - this->studentCustomButtonPublisher.publish(msg_custom_button); - - ROS_INFO("Student button 1 pressed in GUI"); -} - -void MainWindow::on_studentButton_2_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 2; - msg_custom_button.command_code = 0; - this->studentCustomButtonPublisher.publish(msg_custom_button); - ROS_INFO("Student button 2 pressed in GUI"); -} - -void MainWindow::on_studentButton_3_clicked() -{ - CustomButton msg_custom_button; - msg_custom_button.button_index = 3; - msg_custom_button.command_code = (ui->studentField_3->text()).toFloat(); - this->studentCustomButtonPublisher.publish(msg_custom_button); - ROS_INFO("Student button 3 pressed in GUI"); -} - - - -Setpoint MainWindow::correctSetpointBox(Setpoint setpoint, CrazyflieContext context) -{ - Setpoint corrected_setpoint; - corrected_setpoint = setpoint; - - float x_size = context.localArea.xmax - context.localArea.xmin; - float y_size = context.localArea.ymax - context.localArea.ymin; - float z_size = context.localArea.zmax - context.localArea.zmin; - - if(setpoint.x > x_size/2) - corrected_setpoint.x = x_size/2; - if(setpoint.y > y_size/2) - corrected_setpoint.y = y_size/2; - if(setpoint.z > z_size) - corrected_setpoint.z = z_size; - - if(setpoint.x < -x_size/2) - corrected_setpoint.x = -x_size/2; - if(setpoint.y < -y_size/2) - corrected_setpoint.y = -y_size/2; - if(setpoint.z < 0) - corrected_setpoint.z = 0; - - return corrected_setpoint; -} - -bool MainWindow::setpointInsideBox(Setpoint setpoint, CrazyflieContext context) -{ - - float x_size = context.localArea.xmax - context.localArea.xmin; - float y_size = context.localArea.ymax - context.localArea.ymin; - float z_size = context.localArea.zmax - context.localArea.zmin; - //position check - if((setpoint.x < -x_size/2) or (setpoint.x > x_size/2)) { - ROS_INFO_STREAM("x outside safety box"); - return false; - } - if((setpoint.y < -y_size/2) or (setpoint.y > y_size/2)) { - ROS_INFO_STREAM("y outside safety box"); - return false; - } - if((setpoint.z < 0) or (setpoint.z > z_size)) { - ROS_INFO_STREAM("z outside safety box"); - return false; - } - - return true; -} - - - - - - - - -// # Custom buttons for the REMOTE controller service -void MainWindow::on_remote_subscribe_button_clicked() -{ - // Initialise the message - ViconSubscribeObjectName msg; - // Set the subscribe flag - msg.shouldSubscribe = true; - // Set the object name - msg.objectName = (ui->remote_object_name->text()).toUtf8().constData(); - // Publish the message - this->remoteSubscribePublisher.publish(msg); -} - -void MainWindow::on_remote_unsubscribe_button_clicked() -{ - // Initialise the message - ViconSubscribeObjectName msg; - // Set the subscribe flag - msg.shouldSubscribe = false; - // Set the object name - msg.objectName = (ui->remote_object_name->text()).toUtf8().constData(); - // Publish the message - this->remoteSubscribePublisher.publish(msg); -} - -void MainWindow::on_remote_activate_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 1; - // Publish the message - this->remoteActivatePublisher.publish(msg); -} - -void MainWindow::on_remote_deactivate_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 0; - // Publish the message - this->remoteActivatePublisher.publish(msg); -} - -void MainWindow::remoteDataCallback(const CrazyflieData& objectData) -{ - // Check if the object is occluded - if (objectData.occluded) - { - // Set the column heading label to have a red background - // > IMPORTANT: Set the background auto fill property to true - ui->remote_data_label->setAutoFillBackground(true); - // > Get the pallette currently set for the label - QPalette pal = ui->remote_roll_label->palette(); - // > Set the palette property that will change the background - pal.setColor(QPalette::Window, QColor(Qt::red)); - // > Update the palette for the label - ui->remote_data_label->setPalette(pal); - } - else - { - // Put the roll, pitch, yaw, and z data into the appropriate fields - ui->remote_data_roll ->setText(QString::number( objectData.roll * RAD2DEG, 'f', 1)); - ui->remote_data_pitch->setText(QString::number( objectData.pitch * RAD2DEG, 'f', 1)); - ui->remote_data_yaw ->setText(QString::number( objectData.yaw * RAD2DEG, 'f', 1)); - ui->remote_data_z ->setText(QString::number( objectData.z, 'f', 2)); - - // Set the column heading label to have a "normal" background - // > IMPORTANT: Set the background auto fill property to true - ui->remote_data_label->setAutoFillBackground(false); - // > Get the pallette currently set for the roll label - QPalette pal = ui->remote_roll_label->palette(); - // > Update the palette for the column heading label - ui->remote_data_label->setPalette(pal); - } -} - -void MainWindow::remoteControlSetpointCallback(const CrazyflieData& setpointData) -{ - ui->remote_setpoint_roll ->setText(QString::number( setpointData.roll * RAD2DEG, 'f', 1)); - ui->remote_setpoint_pitch->setText(QString::number( setpointData.pitch * RAD2DEG, 'f', 1)); - ui->remote_setpoint_yaw ->setText(QString::number( setpointData.yaw * RAD2DEG, 'f', 1)); - ui->remote_setpoint_z ->setText(QString::number( setpointData.z, 'f', 2)); -} - - - - - - -// TUNING CONTROLLER TAB -void MainWindow::on_tuning_test_horizontal_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 1; - // Publish the message - this->tuningActivateTestPublisher.publish(msg); -} - -void MainWindow::on_tuning_test_vertical_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 2; - // Publish the message - this->tuningActivateTestPublisher.publish(msg); -} - -void MainWindow::on_tuning_test_heading_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 3; - // Publish the message - this->tuningActivateTestPublisher.publish(msg); -} - -void MainWindow::on_tuning_test_all_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 4; - // Publish the message - this->tuningActivateTestPublisher.publish(msg); -} - -void MainWindow::on_tuning_test_circle_button_clicked() -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = 5; - // Publish the message - this->tuningActivateTestPublisher.publish(msg); -} - -void MainWindow::on_tuning_slider_horizontal_valueChanged(int value) -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = value; - // Publish the message - this->tuningHorizontalGainPublisher.publish(msg); -} - -void MainWindow::on_tuning_slider_vertical_valueChanged(int value) -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = value; - // Publish the message - this->tuningVerticalGainPublisher.publish(msg); -} - -void MainWindow::on_tuning_slider_heading_valueChanged(int value) -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = value; - // Publish the message - this->tuningHeadingGainPublisher.publish(msg); -} - - - - - - - - - - -// PICKER CONTROLLER TAB - -// > FOR THE BUTTONS - -void MainWindow::send_picker_button_clicked_message(int button_index) -{ - // Initialise the message - std_msgs::Int32 msg; - // Set the msg data - msg.data = button_index; - // Publish the message - this->pickerButtonPressedPublisher.publish(msg); -} - -void MainWindow::send_picker_button_clicked_message_with_setpoint(const SetpointV2& setpointV2_to_send) -{ - // Publish the message - this->pickerButtonPressedWithSetpointPublisher.publish(setpointV2_to_send); -} - -void MainWindow::on_picker_gotostart_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_GOTOSTART); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_GOTOSTART; - msg_setpointV2.isChecked = ui->picker_gotostart_checkBox->isChecked(); - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the (x,y,z) coordinates from the GUI - if(!ui->picker_gotostart_x->text().isEmpty()) - msg_setpointV2.x = (ui->picker_gotostart_x->text()).toFloat(); - if(!ui->picker_gotostart_y->text().isEmpty()) - msg_setpointV2.y = (ui->picker_gotostart_y->text()).toFloat(); - if(!ui->picker_gotostart_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_gotostart_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_attach_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_ATTACH); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_ATTACH; - msg_setpointV2.isChecked = ui->picker_attach_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the z coordinates from the GUI - if(!ui->picker_attach_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_attach_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_pickup_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_PICKUP); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_PICKUP; - msg_setpointV2.isChecked = ui->picker_pickup_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the z coordinates from the GUI - if(!ui->picker_pickup_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_pickup_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_gotoend_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_GOTOEND); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_GOTOEND; - msg_setpointV2.isChecked = ui->picker_gotoend_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the (x,y) coordinates from the GUI - if(!ui->picker_gotoend_x->text().isEmpty()) - msg_setpointV2.x = (ui->picker_gotoend_x->text()).toFloat(); - if(!ui->picker_gotoend_y->text().isEmpty()) - msg_setpointV2.y = (ui->picker_gotoend_y->text()).toFloat(); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_putdown_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_PUTDOWN); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_PUTDOWN; - msg_setpointV2.isChecked = ui->picker_putdown_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the z coordinates from the GUI - if(!ui->picker_putdown_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_putdown_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_squat_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_SQUAT); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_SQUAT; - msg_setpointV2.isChecked = ui->picker_squat_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the z coordinates from the GUI - if(!ui->picker_squat_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_squat_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_jump_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_JUMP); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_JUMP; - msg_setpointV2.isChecked = ui->picker_jump_checkBox->isChecked();; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Get the z coordinates from the GUI - if(!ui->picker_jump_z->text().isEmpty()) - msg_setpointV2.z = (ui->picker_jump_z->text()).toFloat(); - // Update the z slider in the GUI - ui->picker_z_slider->setValue( int((msg_setpointV2.z+0.005)*100.0) ); - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_1_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_1); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_1; - msg_setpointV2.isChecked = true; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_2_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_2); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_2; - msg_setpointV2.isChecked = true; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_3_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_3); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_3; - msg_setpointV2.isChecked = true; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} -void MainWindow::on_picker_4_button_clicked() -{ - if (!shouldSendWithSetpoint_for_pickerButtons) - { - // Call the function that sends the message - send_picker_button_clicked_message(PICKER_BUTTON_4); - } - else - { - // Construct the setpoint - SetpointV2 msg_setpointV2; - msg_setpointV2.buttonID = PICKER_BUTTON_4; - msg_setpointV2.isChecked = true; - msg_setpointV2.x = 0.0; - msg_setpointV2.y = 0.0; - msg_setpointV2.z = 0.0; - msg_setpointV2.yaw = 0.0; - // Call the function that sends the message - send_picker_button_clicked_message_with_setpoint(msg_setpointV2); - } -} - - - -// > FOR THE SLIDERS AND DIAL - -void MainWindow::on_picker_x_slider_valueChanged(int value) -{ - // Initialise the message - std_msgs::Float32 msg; - // Set the msg data - msg.data = float(value) / 100.0f; - // Publish the message - this->pickerXAdjustmentPublisher.publish(msg); -} -void MainWindow::on_picker_y_slider_valueChanged(int value) -{ - // Initialise the message - std_msgs::Float32 msg; - // Set the msg data - msg.data = float(value) / 100.0f; - // Publish the message - this->pickerYAdjustmentPublisher.publish(msg); -} -void MainWindow::on_picker_z_slider_valueChanged(int value) -{ - ROS_INFO_STREAM("[Student GUI] z slider int value " << value ); - // Initialise the message - std_msgs::Float32 msg; - // Set the msg data - msg.data = float(value) / 100.0f; - // Publish the message - this->pickerZSetpointPublisher.publish(msg); -} -void MainWindow::on_picker_mass_slider_valueChanged(int value) -{ - // Initialise the message - std_msgs::Float32 msg; - // Set the msg data - msg.data = float(value); - // Publish the message - this->pickerMassPublisher.publish(msg); -} -void MainWindow::on_picker_yaw_dial_valueChanged(int value) -{ - // Initialise the message - std_msgs::Float32 msg; - // Set the msg data - msg.data = float(value) * DEG2RAD; - // Publish the message - this->pickerYawSetpointPublisher.publish(msg); -} - - - diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.ui b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.ui deleted file mode 100644 index 7890bdbb412dc9f5fc7be68e8174594943510c65..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/MainWindow.ui +++ /dev/null @@ -1,5238 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1500</width> - <height>1000</height> - </rect> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>1500</width> - <height>1000</height> - </size> - </property> - <property name="windowTitle"> - <string>MainWindow</string> - </property> - <widget class="QWidget" name="centralWidget"> - <layout class="QGridLayout" name="gridLayout"> - <item row="1" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <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> - <widget class="QGroupBox" name="groupBox"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>18</pointsize> - <weight>50</weight> - <bold>false</bold> - </font> - </property> - <property name="title"> - <string>StudentID # connected to CF #</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <layout class="QGridLayout" name="gridLayout_2"/> - </widget> - </item> - <item> - <widget class="Line" name="line_9"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="sizeConstraint"> - <enum>QLayout::SetMaximumSize</enum> - </property> - <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> - <widget class="QPushButton" name="RF_disconnect_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>750</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Disconnect</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="rf_status_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>95</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>95</width> - <height>70</height> - </size> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="RF_Connect_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>750</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Connect</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="voltage_field"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>100</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="battery_status_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>50</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>50</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - <italic>true</italic> - </font> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="take_off_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>750</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Take Off</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="land_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>750</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Land</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="flying_state_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>90</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>90</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="motors_OFF_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>70</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>750</width> - <height>70</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Motors OFF</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="Line" name="line_8"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <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> - <widget class="QTabWidget" name="tabWidget"> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="currentIndex"> - <number>3</number> - </property> - <property name="usesScrollButtons"> - <bool>true</bool> - </property> - <property name="tabsClosable"> - <bool>false</bool> - </property> - <widget class="QWidget" name="tab_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <attribute name="title"> - <string> Safe </string> - </attribute> - <layout class="QGridLayout" name="gridLayout_5"> - <item row="0" column="0"> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="6" column="1"> - <widget class="QLineEdit" name="current_roll_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="current_y_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLineEdit" name="current_yaw_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_z_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="current_x_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="current_z_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="current_y_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="current_yaw_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] = </string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="current_x_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QLabel" name="current_pitch_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>pitch [deg] =</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QLabel" name="current_roll_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>roll [deg] =</string> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QLineEdit" name="current_pitch_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLineEdit" name="diff_x_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLineEdit" name="diff_y_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="diff_z_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="diff_yaw_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Difference</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="1"> - <widget class="QGroupBox" name="groupBox_3"> - <property name="title"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_4"> - <item row="2" column="2"> - <widget class="QLineEdit" name="new_setpoint_y_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="new_setpoint_yaw_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLineEdit" name="new_setpoint_x_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="current_setpoint_y_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="current_setpoint_x_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_11"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] =</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_12"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_7"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_setpoint_z_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_9"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_8"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLineEdit" name="current_setpoint_yaw_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="2"> - <widget class="QPushButton" name="set_setpoint_button_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Set setpoint</string> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="new_setpoint_z_safe"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Setpoint:</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_13"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>New</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QLabel" name="error_label"> - <property name="text"> - <string/> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_picker"> - <attribute name="title"> - <string>Picker</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_19"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_18"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item row="0" column="2"> - <layout class="QHBoxLayout" name="horizontalLayout_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> - <item> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <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> - <widget class="QLabel" name="label_47"> - <property name="text"> - <string>Yaw</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_54"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>+ve x-axis</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QDial" name="picker_yaw_dial"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimum"> - <number>-180</number> - </property> - <property name="maximum"> - <number>180</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - <property name="pageStep"> - <number>15</number> - </property> - <property name="value"> - <number>0</number> - </property> - <property name="sliderPosition"> - <number>0</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="wrapping"> - <bool>true</bool> - </property> - <property name="notchTarget"> - <double>6.000000000000000</double> - </property> - <property name="notchesVisible"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_55"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>-ve x-axis</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <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> - <widget class="QLabel" name="label_48"> - <property name="text"> - <string>z</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_51"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>1.0</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <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> - <widget class="QSlider" name="picker_z_slider"> - <property name="maximum"> - <number>100</number> - </property> - <property name="singleStep"> - <number>1</number> - </property> - <property name="pageStep"> - <number>2</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="invertedAppearance"> - <bool>false</bool> - </property> - <property name="invertedControls"> - <bool>false</bool> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBothSides</enum> - </property> - <property name="tickInterval"> - <number>10</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_50"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>0.0</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout_7"> - <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> - <widget class="QLabel" name="label_49"> - <property name="text"> - <string>Mass</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_53"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>38</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_11"> - <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> - <widget class="QSlider" name="picker_mass_slider"> - <property name="minimum"> - <number>28</number> - </property> - <property name="maximum"> - <number>38</number> - </property> - <property name="pageStep"> - <number>1</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBothSides</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_52"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>28</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item row="1" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_8"> - <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> - <widget class="QPushButton" name="picker_1_button"> - <property name="text"> - <string>Button 1</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="picker_2_button"> - <property name="text"> - <string>Button 2</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="picker_3_button"> - <property name="text"> - <string>Button 3</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="picker_4_button"> - <property name="text"> - <string>Button 4</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="2"> - <layout class="QVBoxLayout" name="verticalLayout_9"> - <item> - <widget class="QLabel" name="label_56"> - <property name="text"> - <string>x-axis adjustment</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_12"> - <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> - <widget class="QLabel" name="label_60"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>-0.1</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QSlider" name="picker_x_slider"> - <property name="minimum"> - <number>-10</number> - </property> - <property name="maximum"> - <number>10</number> - </property> - <property name="pageStep"> - <number>1</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBothSides</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_58"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>0.1</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_57"> - <property name="text"> - <string>y-axis adjustment</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_13"> - <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> - <widget class="QLabel" name="label_61"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>-0.1</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item> - <widget class="QSlider" name="picker_y_slider"> - <property name="minimum"> - <number>-10</number> - </property> - <property name="maximum"> - <number>10</number> - </property> - <property name="pageStep"> - <number>1</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksBothSides</enum> - </property> - <property name="tickInterval"> - <number>1</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_59"> - <property name="font"> - <font> - <family>Courier</family> - </font> - </property> - <property name="text"> - <string>0.1</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_20"> - <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="3" column="0"> - <widget class="QPushButton" name="picker_pickup_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Pick-up</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QCheckBox" name="picker_attach_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QCheckBox" name="picker_squat_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QCheckBox" name="picker_putdown_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QCheckBox" name="picker_gotoend_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QCheckBox" name="picker_pickup_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QCheckBox" name="picker_jump_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QLabel" name="label_63"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>y[m]</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QCheckBox" name="picker_gotostart_checkBox"> - <property name="styleSheet"> - <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_62"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>x[m]</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QPushButton" name="picker_gotostart_button"> - <property name="text"> - <string>Goto Start</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QPushButton" name="picker_gotoend_button"> - <property name="text"> - <string>Goto End</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QPushButton" name="picker_attach_button"> - <property name="text"> - <string>Attach</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLineEdit" name="picker_gotostart_x"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_64"> - <property name="text"> - <string>Function:</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QPushButton" name="picker_squat_button"> - <property name="text"> - <string>Squat</string> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QPushButton" name="picker_jump_button"> - <property name="text"> - <string>Jump</string> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QPushButton" name="picker_putdown_button"> - <property name="text"> - <string>Put down</string> - </property> - </widget> - </item> - <item row="1" column="4"> - <widget class="QLineEdit" name="picker_gotostart_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QLineEdit" name="picker_gotostart_y"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="2" column="4"> - <widget class="QLineEdit" name="picker_attach_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="0" column="4"> - <widget class="QLabel" name="label_65"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>z[m]</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="3" column="4"> - <widget class="QLineEdit" name="picker_pickup_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="picker_gotoend_x"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="4" column="3"> - <widget class="QLineEdit" name="picker_gotoend_y"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="5" column="4"> - <widget class="QLineEdit" name="picker_putdown_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="6" column="4"> - <widget class="QLineEdit" name="picker_squat_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="7" column="4"> - <widget class="QLineEdit" name="picker_jump_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="font"> - <font> - <family>Courier 10 Pitch</family> - </font> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_66"> - <property name="text"> - <string>Smooth</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - <item row="1" column="0"> - <spacer name="verticalSpacer_7"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <attribute name="title"> - <string> Demo </string> - </attribute> - <layout class="QGridLayout" name="gridLayout_9"> - <item row="0" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_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> - <layout class="QHBoxLayout" name="horizontalLayout_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> - <widget class="QGroupBox" name="groupBox_5"> - <property name="title"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_7"> - <item row="1" column="2"> - <widget class="QLineEdit" name="diff_x_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QLineEdit" name="current_roll_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="current_y_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLineEdit" name="current_yaw_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_z_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="current_x_label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="current_z_label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="current_x_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="current_y_label_2"> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="current_yaw_label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] = </string> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QLineEdit" name="current_pitch_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QLabel" name="current_pitch_label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>pitch [deg] =</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QLabel" name="current_roll_label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>roll [deg] =</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="diff_z_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLineEdit" name="diff_y_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="diff_yaw_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_10"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Difference</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_6"> - <property name="title"> - <string/> - </property> - <layout class="QGridLayout" name="gridLayout_8"> - <item row="2" column="2"> - <widget class="QLineEdit" name="new_setpoint_y_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="new_setpoint_yaw_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLineEdit" name="new_setpoint_x_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLineEdit" name="current_setpoint_y_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="current_setpoint_x_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="label_14"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] =</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="label_15"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_16"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_17"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_18"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_setpoint_z_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="5" column="2"> - <widget class="QPushButton" name="set_setpoint_button_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Set setpoint</string> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLineEdit" name="current_setpoint_yaw_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="new_setpoint_z_demo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_19"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Setpoint:</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_20"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>New</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_5"> - <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> - <widget class="QPushButton" name="demoButton_1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Command 1</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="demoButton_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Command 2</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="demoButton_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Command 3</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="demoField_3"> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <attribute name="title"> - <string>Student</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_11"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_6"> - <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="15" column="0"> - <widget class="QLabel" name="label_72"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>roll [deg]</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_67"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>x [m]</string> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QLabel" name="label_68"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>y [m]</string> - </property> - </widget> - </item> - <item row="11" column="3"> - <widget class="QLabel" name="label_25"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] =</string> - </property> - </widget> - </item> - <item row="1" column="5"> - <widget class="QLabel" name="label_27"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>New</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="14" column="5"> - <widget class="QPushButton" name="set_setpoint_button_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Set setpoint</string> - </property> - </widget> - </item> - <item row="1" column="4"> - <widget class="QLabel" name="label_26"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QLabel" name="label_28"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Setpoint:</string> - </property> - </widget> - </item> - <item row="3" column="3"> - <widget class="QLabel" name="label_29"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="9" column="3"> - <widget class="QLabel" name="label_24"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="7" column="3"> - <widget class="QLabel" name="label_23"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="3" column="5"> - <widget class="QLineEdit" name="new_setpoint_x_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="11" column="5"> - <widget class="QLineEdit" name="new_setpoint_yaw_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="3" column="4"> - <widget class="QLineEdit" name="current_setpoint_x_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="7" column="4"> - <widget class="QLineEdit" name="current_setpoint_y_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="11" column="4"> - <widget class="QLineEdit" name="current_setpoint_yaw_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="9" column="4"> - <widget class="QLineEdit" name="current_setpoint_z_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="9" column="5"> - <widget class="QLineEdit" name="new_setpoint_z_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="7" column="5"> - <widget class="QLineEdit" name="new_setpoint_y_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="label_73"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Current</string> - </property> - </widget> - </item> - <item row="14" column="0"> - <widget class="QLabel" name="label_71"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>pitch [deg]</string> - </property> - </widget> - </item> - <item row="11" column="0"> - <widget class="QLabel" name="label_70"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>yaw [deg]</string> - </property> - </widget> - </item> - <item row="9" column="0"> - <widget class="QLabel" name="label_69"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>z [m]</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLabel" name="label_74"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Difference</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_x_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="diff_x_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QLineEdit" name="current_y_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="7" column="2"> - <widget class="QLineEdit" name="diff_y_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="9" column="1"> - <widget class="QLineEdit" name="current_z_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="9" column="2"> - <widget class="QLineEdit" name="diff_z_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="11" column="1"> - <widget class="QLineEdit" name="current_yaw_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="11" column="2"> - <widget class="QLineEdit" name="diff_yaw_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="14" column="1"> - <widget class="QLineEdit" name="current_pitch_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="15" column="1"> - <widget class="QLineEdit" name="current_roll_student"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="16" column="2"> - <widget class="QPushButton" name="studentButton_1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Command 1</string> - </property> - </widget> - </item> - <item row="16" column="3"> - <widget class="QPushButton" name="studentButton_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Commnd 2</string> - </property> - </widget> - </item> - <item row="16" column="4"> - <widget class="QPushButton" name="studentButton_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Command 3</string> - </property> - </widget> - </item> - <item row="16" column="5"> - <widget class="QLineEdit" name="studentField_3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>40</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <attribute name="title"> - <string>MPC</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_13"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_12"> - <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="1" column="2"> - <widget class="QLabel" name="label_30"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>New</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="14" column="2"> - <widget class="QPushButton" name="set_setpoint_button_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Set setpoint</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="label_31"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Current</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label_32"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Setpoint:</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="label_33"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>x [m] =</string> - </property> - </widget> - </item> - <item row="11" column="0"> - <widget class="QLabel" name="label_34"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>yaw [deg] =</string> - </property> - </widget> - </item> - <item row="9" column="0"> - <widget class="QLabel" name="label_35"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>z [m] =</string> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QLabel" name="label_36"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>y [m] =</string> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QLineEdit" name="new_setpoint_x_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="11" column="2"> - <widget class="QLineEdit" name="new_setpoint_yaw_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLineEdit" name="current_setpoint_x_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QLineEdit" name="current_setpoint_y_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="11" column="1"> - <widget class="QLineEdit" name="current_setpoint_yaw_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="9" column="1"> - <widget class="QLineEdit" name="current_setpoint_z_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="9" column="2"> - <widget class="QLineEdit" name="new_setpoint_z_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - <item row="7" column="2"> - <widget class="QLineEdit" name="new_setpoint_y_mpc"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_remote"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <attribute name="title"> - <string>Remote</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_14"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_10"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>6</number> - </property> - <item row="0" column="0"> - <widget class="QLineEdit" name="remote_object_name"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="QLineEdit" name="remote_data_pitch"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QPushButton" name="remote_unsubscribe_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>UN-subscribe</string> - </property> - </widget> - </item> - <item row="7" column="2"> - <widget class="QLineEdit" name="remote_setpoint_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QPushButton" name="remote_subscribe_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Subscribe</string> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="QLineEdit" name="remote_data_z"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="6" column="2"> - <widget class="QLineEdit" name="remote_setpoint_yaw"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="QLineEdit" name="remote_data_yaw"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="Line" name="line_12"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="Line" name="line_10"> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="5" column="2"> - <widget class="QLineEdit" name="remote_setpoint_pitch"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QLineEdit" name="remote_data_roll"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="Line" name="line_11"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QLineEdit" name="remote_setpoint_roll"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <family>Monospace</family> - </font> - </property> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QLabel" name="remote_data_label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Remote</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLabel" name="label_38"> - <property name="text"> - <string>Setpoint</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="remote_roll_label"> - <property name="text"> - <string>Roll [deg]</string> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QLabel" name="remote_pitch_label"> - <property name="text"> - <string>Pitch [deg]</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QLabel" name="remote_yaw_label"> - <property name="text"> - <string>Yaw [deg]</string> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QLabel" name="remote_z_label"> - <property name="text"> - <string>z [m]</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="0" column="1"> - <layout class="QVBoxLayout" name="verticalLayout_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> - <item> - <spacer name="verticalSpacer_2"> - <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> - <widget class="QPushButton" name="remote_activate_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>100</height> - </size> - </property> - <property name="text"> - <string>Activate</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="remote_deactivate_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>16777215</width> - <height>100</height> - </size> - </property> - <property name="text"> - <string>DE-activate</string> - </property> - </widget> - </item> - <item> - <spacer name="verticalSpacer_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <attribute name="title"> - <string>Tuning</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_16"> - <item row="0" column="0"> - <layout class="QGridLayout" name="gridLayout_15"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item row="4" column="0"> - <widget class="QLabel" name="label_45"> - <property name="text"> - <string>Vertical Controller Gain (Vertikal Regler Verstaekung)</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="Line" name="line_13"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="Line" name="line_15"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="11" column="0"> - <spacer name="verticalSpacer_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>10</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="1"> - <widget class="QPushButton" name="tuning_test_horizontal_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>160</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Test</string> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="Line" name="line_16"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="8" column="0"> - <widget class="QLabel" name="label_46"> - <property name="text"> - <string>Heading Controller Gain (Orientierung Regler Verstaekung)</string> - </property> - </widget> - </item> - <item row="12" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QPushButton" name="tuning_test_all_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>340</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Test All</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="tuning_test_circle_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>340</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Fly a circle</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="6" column="0"> - <widget class="Line" name="line_14"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="3" column="0"> - <spacer name="verticalSpacer_5"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>5</height> - </size> - </property> - </spacer> - </item> - <item row="9" column="1"> - <widget class="QPushButton" name="tuning_test_heading_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>160</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Test</string> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_37"> - <property name="text"> - <string>Horizontal Controller Gain (Horizontal Regler Verstaekung)</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - </widget> - </item> - <item row="5" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <item> - <widget class="QLabel" name="label_39"> - <property name="text"> - <string>Min</string> - </property> - </widget> - </item> - <item> - <widget class="QSlider" name="tuning_slider_vertical"> - <property name="maximum"> - <number>1000</number> - </property> - <property name="value"> - <number>100</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>100</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_40"> - <property name="text"> - <string>Max</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="5" column="1"> - <widget class="QPushButton" name="tuning_test_vertical_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>160</width> - <height>50</height> - </size> - </property> - <property name="text"> - <string>Test</string> - </property> - </widget> - </item> - <item row="7" column="0"> - <spacer name="verticalSpacer_6"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>5</height> - </size> - </property> - </spacer> - </item> - <item row="9" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_6"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <item> - <widget class="QLabel" name="label_41"> - <property name="text"> - <string>Min</string> - </property> - </widget> - </item> - <item> - <widget class="QSlider" name="tuning_slider_heading"> - <property name="maximum"> - <number>1000</number> - </property> - <property name="value"> - <number>100</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>100</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_42"> - <property name="text"> - <string>Max</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="1" column="0"> - <layout class="QHBoxLayout" name="horizontalLayout_7"> - <property name="leftMargin"> - <number>6</number> - </property> - <property name="rightMargin"> - <number>6</number> - </property> - <item> - <widget class="QLabel" name="label_43"> - <property name="text"> - <string>Min</string> - </property> - </widget> - </item> - <item> - <widget class="QSlider" name="tuning_slider_horizontal"> - <property name="maximum"> - <number>1000</number> - </property> - <property name="value"> - <number>100</number> - </property> - <property name="tracking"> - <bool>false</bool> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::TicksAbove</enum> - </property> - <property name="tickInterval"> - <number>100</number> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="label_44"> - <property name="text"> - <string>Max</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="10" column="0"> - <widget class="Line" name="line_17"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="10" column="1"> - <widget class="Line" name="line_18"> - <property name="lineWidth"> - <number>5</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item> - <layout class="QGridLayout" name="gridLayout_17"> - <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="8" column="1"> - <widget class="Line" name="line_20"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="9" column="2"> - <widget class="QPushButton" name="load_tuning_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Tuning</string> - </property> - </widget> - </item> - <item row="7" column="1"> - <widget class="Line" name="line_21"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="6" column="1"> - <widget class="Line" name="line_22"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="7" column="2"> - <widget class="QPushButton" name="load_mpc_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>MPC</string> - </property> - </widget> - </item> - <item row="8" column="2"> - <widget class="QPushButton" name="load_remote_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Remote</string> - </property> - </widget> - </item> - <item row="6" column="2"> - <widget class="QPushButton" name="load_student_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Student</string> - </property> - </widget> - </item> - <item row="6" column="0"> - <widget class="QPushButton" name="enable_student_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Student</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Load</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_21"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - </font> - </property> - <property name="text"> - <string>Controller</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Enable</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="5" column="0"> - <widget class="QPushButton" name="enable_demo_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Demo</string> - </property> - </widget> - </item> - <item row="10" 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="3" column="2"> - <widget class="QPushButton" name="load_safe_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Safe</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QPushButton" name="enable_safe_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Safe</string> - </property> - </widget> - </item> - <item row="5" column="2"> - <widget class="QPushButton" name="load_demo_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Demo</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="Line" name="line_3"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLabel" name="label_22"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>30</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>16</pointsize> - <weight>75</weight> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>YAML</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="5" column="1"> - <widget class="Line" name="line_4"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="Line" name="line_7"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="Line" name="line_6"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="10" column="1"> - <widget class="Line" name="line_5"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="7" column="0"> - <widget class="QPushButton" name="enable_mpc_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>MPC</string> - </property> - </widget> - </item> - <item row="8" column="0"> - <widget class="QPushButton" name="enable_remote_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Remote</string> - </property> - </widget> - </item> - <item row="9" column="1"> - <widget class="Line" name="line_19"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item row="9" column="0"> - <widget class="QPushButton" name="enable_tuning_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Tuning</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QPushButton" name="enable_picker_controller"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Picker</string> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QPushButton" name="load_picker_yaml_button"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>180</width> - <height>50</height> - </size> - </property> - <property name="font"> - <font> - <pointsize>14</pointsize> - </font> - </property> - <property name="text"> - <string>Picker</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="Line" name="line_2"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QMenuBar" name="menuBar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>1500</width> - <height>25</height> - </rect> - </property> - </widget> - <widget class="QToolBar" name="mainToolBar"> - <attribute name="toolBarArea"> - <enum>TopToolBarArea</enum> - </attribute> - <attribute name="toolBarBreak"> - <bool>false</bool> - </attribute> - </widget> - <widget class="QStatusBar" name="statusBar"/> - </widget> - <layoutdefault spacing="6" margin="11"/> - <resources/> - <connections/> -</ui> diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/main.cpp b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/main.cpp deleted file mode 100644 index 27bdde984af32065c2c7c03ddef660376e51004a..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/main.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2017, ETH Zurich, D-ITET, Angel Romero -// -// This file is part of D-FaLL-System. -// -// D-FaLL-System is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// D-FaLL-System is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with D-FaLL-System. If not, see <http://www.gnu.org/licenses/>. -// -// -// ---------------------------------------------------------------------------------- -// DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M -// D D F aaa L L S Y Y S T E MM MM -// D D --- FFFF a a L L --- SSS Y SSS T EEE M M M -// D D F a aa L L S Y S T E M M -// DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M -// -// -// DESCRIPTION: -// Main program of the Student's GUI -// -// ---------------------------------------------------------------------------------- - - -#include "MainWindow.h" -#include <QApplication> - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - MainWindow w(argc, argv); - w.show(); - return a.exec(); -} diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/rosNodeThread_for_studentGUI.cpp b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/rosNodeThread_for_studentGUI.cpp deleted file mode 100644 index ed87c8895c2fb212f82a5bd1cfdc01ac770596d2..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/src/rosNodeThread_for_studentGUI.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2017, ETH Zurich, D-ITET, Angel Romero -// -// This file is part of D-FaLL-System. -// -// D-FaLL-System is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// D-FaLL-System is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with D-FaLL-System. If not, see <http://www.gnu.org/licenses/>. -// -// -// ---------------------------------------------------------------------------------- -// DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M -// D D F aaa L L S Y Y S T E MM MM -// D D --- FFFF a a L L --- SSS Y SSS T EEE M M M -// D D F a aa L L S Y S T E M M -// DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M -// -// -// DESCRIPTION: -// Takes care of creating a ros node thread. -// -// ---------------------------------------------------------------------------------- - - -#include "rosNodeThread_for_studentGUI.h" - -#include "dfall_pkg/CMRead.h" -#include "dfall_pkg/CMUpdate.h" -#include "dfall_pkg/CMCommand.h" - - -rosNodeThread::rosNodeThread(int argc, char** pArgv, const char * node_name, QObject* parent) - : QObject(parent), - m_Init_argc(argc), - m_pInit_argv(pArgv), - m_node_name(node_name) - -{ - /** Constructor for the node thread **/ -} - -rosNodeThread::~rosNodeThread() -{ - if (ros::isStarted()) - { - ros::shutdown(); - ros::waitForShutdown(); - } // end if - m_pThread->wait(); -} // end destructor - -bool rosNodeThread::init() -{ - m_pThread = new QThread(); - this->moveToThread(m_pThread); // QObject method - - connect(m_pThread, SIGNAL(started()), this, SLOT(run())); - ros::init(m_Init_argc, m_pInit_argv, m_node_name); // student_GUI is the name of this node - - if (!ros::master::check()) - { - ROS_ERROR("Master not found, please check teacher computer is running and try again"); - return false; // do not start without ros. - } - - ros::start(); - ros::Time::init(); - ros::NodeHandle nh("~"); - - m_vicon_subscriber = nh.subscribe("/ViconDataPublisher/ViconData", 100, &rosNodeThread::messageCallback, this); - - // clients for db services: - m_read_db_client = nh.serviceClient<CMRead>("/CentralManagerService/Read", false); - m_update_db_client = nh.serviceClient<CMUpdate>("/CentralManagerService/Update", false); - m_command_db_client = nh.serviceClient<CMCommand>("/CentralManagerService/Command", false); - - m_pThread->start(); - return true; -} // set up the thread - -void rosNodeThread::messageCallback(const ptrToMessage& p_msg) // When a message arrives to the topic, this callback is executed -{ - emit newViconData(p_msg); //pass the message to other places -} - -void rosNodeThread::run() -{ - ros::Rate loop_rate(100); - QMutex * pMutex; - while (ros::ok()) - { - pMutex = new QMutex(); - - // geometry_msgs::Twist cmd_msg; - pMutex->lock(); - // cmd_msg.linear.x = m_speed; - // cmd_msg.angular.z = m_angle; - pMutex->unlock(); - // ROS_INFO("RUNNING"); - - // sim_velocity.publish(cmd_msg); - ros::spinOnce(); - loop_rate.sleep(); - delete pMutex; - } // do ros things. -} diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentGUI.pro b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentGUI.pro deleted file mode 100644 index 215f47e85bbff68fcc2f216447650b4078b98923..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentGUI.pro +++ /dev/null @@ -1,28 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2017-08-21T11:01:25 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = studentGUI -TEMPLATE = app - -INCLUDEPATH += $$PWD/include -CONFIG += c++11 - -SOURCES += \ - src/main.cpp \ - src/MainWindow.cpp - -HEADERS += \ - include/MainWindow.h \ - -FORMS += \ - src/MainWindow.ui - -RESOURCES += \ - studentgui.qrc diff --git a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentgui.qrc b/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentgui.qrc deleted file mode 100644 index 0f6e7d8eebb915c0f0f16522394150bbc2d84ec1..0000000000000000000000000000000000000000 --- a/dfall_ws/src/dfall_pkg/GUI_Qt/studentGUI/studentgui.qrc +++ /dev/null @@ -1,19 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>images/battery_20.png</file> - <file>images/battery_40.png</file> - <file>images/battery_60.png</file> - <file>images/battery_80.png</file> - <file>images/battery_empty.png</file> - <file>images/battery_full.png</file> - <file>images/rf_connected.png</file> - <file>images/rf_connecting.png</file> - <file>images/rf_disconnected.png</file> - <file>images/battery_unknown.png</file> - <file>images/flying_state_disabling.png</file> - <file>images/flying_state_enabling.png</file> - <file>images/flying_state_flying.png</file> - <file>images/flying_state_off.png</file> - <file>images/flying_state_unknown.png</file> - </qresource> -</RCC> diff --git a/dfall_ws/src/dfall_pkg/src/nodes/FlyingAgentClient.cpp b/dfall_ws/src/dfall_pkg/src/nodes/FlyingAgentClient.cpp index eadb4743d8eecb32126d55b431b2afc50d32cc76..159faa7dbdb2f475fb6e8a0db9d5e172a918e90e 100755 --- a/dfall_ws/src/dfall_pkg/src/nodes/FlyingAgentClient.cpp +++ b/dfall_ws/src/dfall_pkg/src/nodes/FlyingAgentClient.cpp @@ -710,7 +710,8 @@ void loadPickerController() void sendMessageUsingController(int controller) { - // send a message in topic for the studentGUI to read it + // Send a message on the topic for informing the Flying + // Agent GUI about this update std_msgs::Int32 controller_used_msg; controller_used_msg.data = controller; controllerUsedPublisher.publish(controller_used_msg);