To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 09de52d3 authored by beuchatp's avatar beuchatp
Browse files

Change the rosnodethread to have a different name for each GUI

parent 2f6d9913
......@@ -95,7 +95,7 @@ set(SRC_HDRS_QOBJECT_GUI
${MY_GUI_LIB_PATH_INC}/myGraphicsScene.h
${MY_GUI_LIB_PATH_INC}/myGraphicsView.h
${MY_GUI_LIB_PATH_INC}/mainguiwindow.h
${MY_GUI_LIB_PATH_INC}/rosNodeThread.h
${MY_GUI_LIB_PATH_INC}/rosNodeThread_for_managerGUI.h
${MY_GUI_LIB_PATH_INC}/CFLinker.h
)
# GUI -- wrap UI file and QOBJECT files
......@@ -109,7 +109,7 @@ qt5_add_resources(MY_RESOURCE_FILE_RCC ${MY_RESOURCE_FILE_QRC})
# 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.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)
......@@ -334,7 +334,7 @@ set(MY_CPP_SOURCES_GUI # compilation of sources
${MY_GUI_LIB_PATH_SRC}/myGraphicsView.cpp
${MY_GUI_LIB_PATH_SRC}/tablePiece.cpp
${MY_GUI_LIB_PATH_SRC}/marker.cpp
${MY_GUI_LIB_PATH_SRC}/rosNodeThread.cpp
${MY_GUI_LIB_PATH_SRC}/rosNodeThread_for_managerGUI.cpp
${MY_GUI_LIB_PATH_SRC}/crazyFly.cpp
${MY_GUI_LIB_PATH_SRC}/CFLinker.cpp
${MY_GUI_LIB_PATH_SRC}/channelLUT.cpp
......@@ -347,7 +347,7 @@ set(MY_CPP_SOURCES_GUI # compilation of sources
set(MY_CPP_SOURCES_STUDENT_GUI # compilation of sources
${STUDENT_GUI_LIB_PATH_SRC}/MainWindow.cpp
${STUDENT_GUI_LIB_PATH_SRC}/main.cpp
${STUDENT_GUI_LIB_PATH_SRC}/rosNodeThread.cpp
${STUDENT_GUI_LIB_PATH_SRC}/rosNodeThread_for_studentGUI.cpp
)
......
......@@ -38,7 +38,7 @@
#include "crazyFlyZone.h"
#include "ui_mainguiwindow.h"
#include "rosNodeThread.h"
#include "rosNodeThread_for_managerGUI.h"
#include <QObject>
......
......@@ -41,7 +41,7 @@
#ifdef CATKIN_MAKE
#include "rosNodeThread.h"
#include "rosNodeThread_for_managerGUI.h"
#include "marker.h"
#include "crazyFly.h"
#include "CFLinker.h"
......
......@@ -30,8 +30,8 @@
// ----------------------------------------------------------------------------------
#ifndef ___ROSNODETHREAD_H___
#define ___ROSNODETHREAD_H___
#ifndef ___ROSNODETHREAD_FOR_MANAGERGUI_H___
#define ___ROSNODETHREAD_FOR_MANAGERGUI_H___
#include <QtCore>
#include <QThread>
......
......@@ -228,7 +228,7 @@ void myGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
tmp_crazyfly_zone_item->setRect(QRectF(*p1, mouseEvent->scenePos()));
tmp_crazyfly_zone_item->updateCenterMarker();
qDebug("Mouse Position: %d, %d", (mouseEvent->scenePos()).toPoint().x(), (mouseEvent->scenePos()).toPoint().y());
qDebug("Rectangle BottomRight Position: %d, %d", tmp_crazyfly_zone_item->rect().bottomRight().x(), tmp_crazyfly_zone_item->rect().bottomRight().y());
qDebug("Rectangle BottomRight Position: %f, %f", tmp_crazyfly_zone_item->rect().bottomRight().x(), tmp_crazyfly_zone_item->rect().bottomRight().y());
break;
}
}
......
......@@ -30,7 +30,7 @@
// ----------------------------------------------------------------------------------
#include "rosNodeThread.h"
#include "rosNodeThread_for_managerGUI.h"
#include "d_fall_pps/CMRead.h"
#include "d_fall_pps/CMUpdate.h"
......
......@@ -34,11 +34,12 @@
#define MAINWINDOW_H
#include <QMainWindow>
#include <QShortcut>
#include <std_msgs/Int32.h>
#include <std_msgs/Float32.h>
#include "rosNodeThread.h"
#include "rosNodeThread_for_studentGUI.h"
#include "d_fall_pps/CrazyflieContext.h"
#include "d_fall_pps/CrazyflieData.h"
......@@ -196,6 +197,8 @@ private slots:
private:
Ui::MainWindow *ui;
QShortcut* m_close_GUI_shortcut;
rosNodeThread* m_rosNodeThread;
int m_radio_status;
float m_battery_voltage;
......
......@@ -30,8 +30,8 @@
// ----------------------------------------------------------------------------------
#ifndef ___ROSNODETHREAD_H___
#define ___ROSNODETHREAD_H___
#ifndef ___ROSNODETHREAD_FOR_STUDENTGUI_H___
#define ___ROSNODETHREAD_FOR_STUDENTGUI_H___
#include <QtCore>
#include <QThread>
......
......@@ -33,7 +33,6 @@
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include <string>
#include <QShortcut>
#include <ros/ros.h>
#include <ros/network.h>
......@@ -206,7 +205,7 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
// > 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
QShortcut* close_GUI_shortcut = new QShortcut(QKeySequence(tr("CTRL+C")), this, SLOT(close()));
m_close_GUI_shortcut = new QShortcut(QKeySequence(tr("CTRL+C")), this, SLOT(close()));
initialize_demo_setpoint();
......
......@@ -30,7 +30,7 @@
// ----------------------------------------------------------------------------------
#include "rosNodeThread.h"
#include "rosNodeThread_for_studentGUI.h"
#include "d_fall_pps/CMRead.h"
#include "d_fall_pps/CMUpdate.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment