Commit ec1b6c54 authored by bucyril's avatar bucyril
Browse files

Merge branch 'pps_project' of https://gitlab.ethz.ch/D-FaLL/D-FaLL-System into pps_project

parents 807e9605 85d8fe4c
......@@ -5,3 +5,4 @@
# IF YOU CHANGE IT, USE rosinstall FOR THE CHANGES TO TAKE EFFECT
- setup-file: {local-name: /opt/ros/kinetic/setup.sh}
- other: {local-name: sandbox}
- other: {local-name: /home/gazebo-cf/crazyflie_ws/sandbox}
......@@ -4,3 +4,4 @@
# USE THE rosinstall TOOL INSTEAD.
# IF YOU CHANGE IT, USE rosinstall FOR THE CHANGES TO TAKE EFFECT
- setup-file: {local-name: /opt/ros/kinetic/setup.sh}
- other: {local-name: sandbox}
QMAKE_DEFAULT_INCDIRS = \
/usr/include/c++/5 \
/usr/include/x86_64-linux-gnu/c++/5 \
/usr/include/c++/5/backward \
/usr/lib/gcc/x86_64-linux-gnu/5/include \
/usr/local/include \
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_DEFAULT_LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/5 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib
This diff is collapsed.
/****************************************************************************
** Meta object code from reading C++ file 'mainguiwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
......@@ -12,15 +12,15 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mainguiwindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.5.1. It"
#error "This file was generated using the moc from 5.7.0. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
struct qt_meta_stringdata_MainGUIWindow_t {
QByteArrayData data[34];
char stringdata0[827];
QByteArrayData data[1];
char stringdata0[14];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
......@@ -29,66 +29,10 @@ struct qt_meta_stringdata_MainGUIWindow_t {
)
static const qt_meta_stringdata_MainGUIWindow_t qt_meta_stringdata_MainGUIWindow = {
{
QT_MOC_LITERAL(0, 0, 13), // "MainGUIWindow"
QT_MOC_LITERAL(1, 14, 12), // "runCallbacks"
QT_MOC_LITERAL(2, 27, 0), // ""
QT_MOC_LITERAL(3, 28, 20), // "PIDParamTableChanged"
QT_MOC_LITERAL(4, 49, 5), // "param"
QT_MOC_LITERAL(5, 55, 21), // "RateParamTableChanged"
QT_MOC_LITERAL(6, 77, 23), // "positionSetpointChanged"
QT_MOC_LITERAL(7, 101, 17), // "sampleTimeChanged"
QT_MOC_LITERAL(8, 119, 21), // "feedforwardCmdChanged"
QT_MOC_LITERAL(9, 141, 3), // "cmd"
QT_MOC_LITERAL(10, 145, 21), // "controllerTypeChanged"
QT_MOC_LITERAL(11, 167, 7), // "checked"
QT_MOC_LITERAL(12, 175, 21), // "trajectoryTypeChanged"
QT_MOC_LITERAL(13, 197, 21), // "on_buttonStop_clicked"
QT_MOC_LITERAL(14, 219, 22), // "on_buttonPrint_clicked"
QT_MOC_LITERAL(15, 242, 31), // "on_buttonSetpointChange_clicked"
QT_MOC_LITERAL(16, 274, 33), // "on_buttonPIDDefaultParams_cli..."
QT_MOC_LITERAL(17, 308, 32), // "on_buttonSetpointCurrPos_clicked"
QT_MOC_LITERAL(18, 341, 35), // "on_buttonDefaultFeedforward_c..."
QT_MOC_LITERAL(19, 377, 28), // "on_buttonResetMissed_clicked"
QT_MOC_LITERAL(20, 406, 23), // "on_SetpointHome_clicked"
QT_MOC_LITERAL(21, 430, 23), // "on_setpointZ200_clicked"
QT_MOC_LITERAL(22, 454, 33), // "on_slideMotorCmdTest_valueCha..."
QT_MOC_LITERAL(23, 488, 5), // "value"
QT_MOC_LITERAL(24, 494, 33), // "on_buttonResetControllers_cli..."
QT_MOC_LITERAL(25, 528, 29), // "on_buttonSetDefaultTs_clicked"
QT_MOC_LITERAL(26, 558, 37), // "on_buttonSetDefaultRateParams..."
QT_MOC_LITERAL(27, 596, 34), // "on_slideRollAngleTest_valueCh..."
QT_MOC_LITERAL(28, 631, 35), // "on_slidePitchAngleTest_valueC..."
QT_MOC_LITERAL(29, 667, 33), // "on_slideYawAngleTest_valueCha..."
QT_MOC_LITERAL(30, 701, 33), // "on_slideRollRateTest_valueCha..."
QT_MOC_LITERAL(31, 735, 34), // "on_slidePitchRateTest_valueCh..."
QT_MOC_LITERAL(32, 770, 32), // "on_slideYawRateTest_valueChanged"
QT_MOC_LITERAL(33, 803, 23) // "on_buttonStop_2_clicked"
QT_MOC_LITERAL(0, 0, 13) // "MainGUIWindow"
},
"MainGUIWindow\0runCallbacks\0\0"
"PIDParamTableChanged\0param\0"
"RateParamTableChanged\0positionSetpointChanged\0"
"sampleTimeChanged\0feedforwardCmdChanged\0"
"cmd\0controllerTypeChanged\0checked\0"
"trajectoryTypeChanged\0on_buttonStop_clicked\0"
"on_buttonPrint_clicked\0"
"on_buttonSetpointChange_clicked\0"
"on_buttonPIDDefaultParams_clicked\0"
"on_buttonSetpointCurrPos_clicked\0"
"on_buttonDefaultFeedforward_clicked\0"
"on_buttonResetMissed_clicked\0"
"on_SetpointHome_clicked\0on_setpointZ200_clicked\0"
"on_slideMotorCmdTest_valueChanged\0"
"value\0on_buttonResetControllers_clicked\0"
"on_buttonSetDefaultTs_clicked\0"
"on_buttonSetDefaultRateParams_clicked\0"
"on_slideRollAngleTest_valueChanged\0"
"on_slidePitchAngleTest_valueChanged\0"
"on_slideYawAngleTest_valueChanged\0"
"on_slideRollRateTest_valueChanged\0"
"on_slidePitchRateTest_valueChanged\0"
"on_slideYawRateTest_valueChanged\0"
"on_buttonStop_2_clicked"
"MainGUIWindow"
};
#undef QT_MOC_LITERAL
......@@ -98,113 +42,22 @@ static const uint qt_meta_data_MainGUIWindow[] = {
7, // revision
0, // classname
0, 0, // classinfo
28, 14, // methods
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 154, 2, 0x0a /* Public */,
3, 1, 155, 2, 0x08 /* Private */,
5, 1, 158, 2, 0x08 /* Private */,
6, 1, 161, 2, 0x08 /* Private */,
7, 1, 164, 2, 0x08 /* Private */,
8, 1, 167, 2, 0x08 /* Private */,
10, 1, 170, 2, 0x08 /* Private */,
12, 1, 173, 2, 0x08 /* Private */,
13, 0, 176, 2, 0x08 /* Private */,
14, 0, 177, 2, 0x08 /* Private */,
15, 0, 178, 2, 0x08 /* Private */,
16, 0, 179, 2, 0x08 /* Private */,
17, 0, 180, 2, 0x08 /* Private */,
18, 0, 181, 2, 0x08 /* Private */,
19, 0, 182, 2, 0x08 /* Private */,
20, 0, 183, 2, 0x08 /* Private */,
21, 0, 184, 2, 0x08 /* Private */,
22, 1, 185, 2, 0x08 /* Private */,
24, 0, 188, 2, 0x08 /* Private */,
25, 0, 189, 2, 0x08 /* Private */,
26, 0, 190, 2, 0x08 /* Private */,
27, 1, 191, 2, 0x08 /* Private */,
28, 1, 194, 2, 0x08 /* Private */,
29, 1, 197, 2, 0x08 /* Private */,
30, 1, 200, 2, 0x08 /* Private */,
31, 1, 203, 2, 0x08 /* Private */,
32, 1, 206, 2, 0x08 /* Private */,
33, 0, 209, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Double, 4,
QMetaType::Void, QMetaType::Double, 4,
QMetaType::Void, QMetaType::Double, 4,
QMetaType::Void, QMetaType::Double, 4,
QMetaType::Void, QMetaType::Double, 9,
QMetaType::Void, QMetaType::Bool, 11,
QMetaType::Void, QMetaType::Bool, 11,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void, QMetaType::Int, 23,
QMetaType::Void,
0 // eod
};
void MainGUIWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
MainGUIWindow *_t = static_cast<MainGUIWindow *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->runCallbacks(); break;
case 1: _t->PIDParamTableChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
case 2: _t->RateParamTableChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
case 3: _t->positionSetpointChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
case 4: _t->sampleTimeChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
case 5: _t->feedforwardCmdChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
case 6: _t->controllerTypeChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 7: _t->trajectoryTypeChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 8: _t->on_buttonStop_clicked(); break;
case 9: _t->on_buttonPrint_clicked(); break;
case 10: _t->on_buttonSetpointChange_clicked(); break;
case 11: _t->on_buttonPIDDefaultParams_clicked(); break;
case 12: _t->on_buttonSetpointCurrPos_clicked(); break;
case 13: _t->on_buttonDefaultFeedforward_clicked(); break;
case 14: _t->on_buttonResetMissed_clicked(); break;
case 15: _t->on_SetpointHome_clicked(); break;
case 16: _t->on_setpointZ200_clicked(); break;
case 17: _t->on_slideMotorCmdTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 18: _t->on_buttonResetControllers_clicked(); break;
case 19: _t->on_buttonSetDefaultTs_clicked(); break;
case 20: _t->on_buttonSetDefaultRateParams_clicked(); break;
case 21: _t->on_slideRollAngleTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 22: _t->on_slidePitchAngleTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 23: _t->on_slideYawAngleTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 24: _t->on_slideRollRateTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 25: _t->on_slidePitchRateTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 26: _t->on_slideYawRateTest_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 27: _t->on_buttonStop_2_clicked(); break;
default: ;
}
}
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObject MainGUIWindow::staticMetaObject = {
......@@ -231,15 +84,6 @@ int MainGUIWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 28)
qt_static_metacall(this, _c, _id, _a);
_id -= 28;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 28)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 28;
}
return _id;
}
QT_END_MOC_NAMESPACE
/********************************************************************************
** Form generated from reading UI file 'mainguiwindow.ui'
**
** Created by: Qt User Interface Compiler version 5.7.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_MAINGUIWINDOW_H
#define UI_MAINGUIWINDOW_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QFrame>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QToolBar>
#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class Ui_MainGUIWindow
{
public:
QWidget *centralWidget;
QFrame *frame;
QTabWidget *tabWidget;
QWidget *tab;
QWidget *tab_2;
QFrame *frame_2;
QFrame *frame_3;
QMenuBar *menuBar;
QToolBar *mainToolBar;
QStatusBar *statusBar;
void setupUi(QMainWindow *MainGUIWindow)
{
if (MainGUIWindow->objectName().isEmpty())
MainGUIWindow->setObjectName(QStringLiteral("MainGUIWindow"));
MainGUIWindow->resize(1701, 923);
centralWidget = new QWidget(MainGUIWindow);
centralWidget->setObjectName(QStringLiteral("centralWidget"));
frame = new QFrame(centralWidget);
frame->setObjectName(QStringLiteral("frame"));
frame->setGeometry(QRect(40, 500, 1171, 361));
frame->setFrameShape(QFrame::StyledPanel);
frame->setFrameShadow(QFrame::Raised);
tabWidget = new QTabWidget(frame);
tabWidget->setObjectName(QStringLiteral("tabWidget"));
tabWidget->setGeometry(QRect(20, 19, 1071, 311));
tab = new QWidget();
tab->setObjectName(QStringLiteral("tab"));
tabWidget->addTab(tab, QString());
tab_2 = new QWidget();
tab_2->setObjectName(QStringLiteral("tab_2"));
tabWidget->addTab(tab_2, QString());
frame_2 = new QFrame(centralWidget);
frame_2->setObjectName(QStringLiteral("frame_2"));
frame_2->setGeometry(QRect(40, 10, 451, 481));
frame_2->setFrameShape(QFrame::StyledPanel);
frame_2->setFrameShadow(QFrame::Raised);
frame_3 = new QFrame(centralWidget);
frame_3->setObjectName(QStringLiteral("frame_3"));
frame_3->setGeometry(QRect(529, 9, 681, 481));
frame_3->setFrameShape(QFrame::StyledPanel);
frame_3->setFrameShadow(QFrame::Raised);
MainGUIWindow->setCentralWidget(centralWidget);
menuBar = new QMenuBar(MainGUIWindow);
menuBar->setObjectName(QStringLiteral("menuBar"));
menuBar->setGeometry(QRect(0, 0, 1701, 19));
MainGUIWindow->setMenuBar(menuBar);
mainToolBar = new QToolBar(MainGUIWindow);
mainToolBar->setObjectName(QStringLiteral("mainToolBar"));
MainGUIWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
statusBar = new QStatusBar(MainGUIWindow);
statusBar->setObjectName(QStringLiteral("statusBar"));
MainGUIWindow->setStatusBar(statusBar);
retranslateUi(MainGUIWindow);
QMetaObject::connectSlotsByName(MainGUIWindow);
} // setupUi
void retranslateUi(QMainWindow *MainGUIWindow)
{
MainGUIWindow->setWindowTitle(QApplication::translate("MainGUIWindow", "MainGUIWindow", 0));
tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate("MainGUIWindow", "Tab 1", 0));
tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainGUIWindow", "Tab 2", 0));
} // retranslateUi
};
namespace Ui {
class MainGUIWindow: public Ui_MainGUIWindow {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAINGUIWINDOW_H
This diff is collapsed.
QMAKE_DEFAULT_INCDIRS = \
/usr/include/c++/5 \
/usr/include/x86_64-linux-gnu/c++/5 \
/usr/include/c++/5/backward \
/usr/lib/gcc/x86_64-linux-gnu/5/include \
/usr/local/include \
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_DEFAULT_LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/5 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib
This diff is collapsed.
#include "CrazyFlieInclude.h"
#include "mainguiwindow.h"
#include "ui_mainguiwindow.h"
#include <QApplication>
#ifndef DEBUG_GUI
#include "CrazyFlieInclude.h"
#endif
int main(int argc, char *argv[])
{
#ifndef DEBUG_GUI
ros::init(argc, argv, "GUI");
ros::NodeHandle nodeHandle("~");
#endif
QApplication applicationGUI(argc, argv);
#ifndef DEBUG_GUI
MainGUIWindow mainWindow(&nodeHandle);
mainWindow.init();
#else
MainGUIWindow mainWindow;
#endif
QTimer *timerExecuteCallbacs = new QTimer(&applicationGUI);
mainWindow.connect(timerExecuteCallbacs, SIGNAL(timeout()), &mainWindow, SLOT(runCallbacks()));
timerExecuteCallbacs->start(100);
#ifndef DEBUG_GUI
QTimer *timerExecuteCallbacks = new QTimer(&applicationGUI);
mainWindow.connect(timerExecuteCallbacks, SIGNAL(timeout()), &mainWindow, SLOT(runCallbacks()));
timerExecuteCallbacks->start(100);
#endif
mainWindow.show();
applicationGUI.exec();
#ifndef DEBUG_GUI
ROS_WARN("GUI application terminated");
#endif
}
#ifndef MAINGUIWINDOW_H
#define MAINGUIWINDOW_H
//#include "/home/crazyfly/Qt5.7.0/5.7/gcc_64/include/QtWidgets/QMainWindow"
#define DEBUG_GUI
#include <QMainWindow>
#include "ros/callback_queue.h"
#include <QTimer>
#ifndef DEBUG_GUI
#include "ros/callback_queue.h"
#include "ros/ros.h"
#include "CrazyFlieTypes.h"
#endif
#include "ui_mainguiwindow.h"
namespace Ui {
class MainGUIWindow;
}
//bool flagMotorCommandsGUI;
#ifndef DEBUG_GUI
struct setpoint
{
double x;
......@@ -43,108 +49,126 @@ private:
QueueElem* currElem;
QueueElem* lastElem;
};
#endif
class MainGUIWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainGUIWindow(ros::NodeHandle*, /*ros::CallbackQueue* callbackQueue, ros::Publisher* publisherMotorCommandsGUI,*/ QWidget *parent = 0);
#ifdef DEBUG_GUI
explicit MainGUIWindow(/*ros::NodeHandle* ,*/ /*ros::CallbackQueue* callbackQueue, ros::Publisher* publisherMotorCommandsGUI,*/ QWidget *parent = 0);
#else
explicit MainGUIWindow(ros::NodeHandle* , /*ros::CallbackQueue* callbackQueue, ros::Publisher* publisherMotorCommandsGUI,*/ QWidget *parent = 0);
#endif
~MainGUIWindow();
#ifndef DEBUG_GUI
void init();
#endif
public slots:
#ifndef DEBUG_GUI
void runCallbacks();
#endif
private slots:
#ifndef DEBUG_GUI
// void PIDParamTableChanged(double param);
// void RateParamTableChanged(double param);
void PIDParamTableChanged(double param);
// void positionSetpointChanged(double param);
void RateParamTableChanged(double param);
// void sampleTimeChanged(double param);
void positionSetpointChanged(double param);
// void feedforwardCmdChanged(double cmd);
void sampleTimeChanged(double param);
// void controllerTypeChanged(bool checked);
void feedforwardCmdChanged(double cmd);
// void trajectoryTypeChanged(bool checked);
void controllerTypeChanged(bool checked);
// void on_buttonStop_clicked();
void trajectoryTypeChanged(bool checked);
// void on_buttonPrint_clicked();
void on_buttonStop_clicked();
// void on_buttonSetpointChange_clicked();
void on_buttonPrint_clicked();
// void on_buttonPIDDefaultParams_clicked();
void on_buttonSetpointChange_clicked();
// void on_buttonSetpointCurrPos_clicked();
void on_buttonPIDDefaultParams_clicked();
// void on_buttonDefaultFeedforward_clicked();
void on_buttonSetpointCurrPos_clicked();
// void on_buttonResetMissed_clicked();
void on_buttonDefaultFeedforward_clicked();
// void on_SetpointHome_clicked();
void on_buttonResetMissed_clicked();
// void on_setpointZ200_clicked();
void on_SetpointHome_clicked();
// void on_slideMotorCmdTest_valueChanged(int value);
void on_setpointZ200_clicked();
// void on_buttonResetControllers_clicked();
void on_slideMotorCmdTest_valueChanged(int value);
// void on_buttonSetDefaultTs_clicked();
void on_buttonResetControllers_clicked();
// void on_buttonSetDefaultRateParams_clicked();
void on_buttonSetDefaultTs_clicked();
// void on_slideRollAngleTest_valueChanged(int value);
void on_buttonSetDefaultRateParams_clicked();
// void on_slidePitchAngleTest_valueChanged(int value);
void on_slideRollAngleTest_valueChanged(int value);
// void on_slideYawAngleTest_valueChanged(int value);
void on_slidePitchAngleTest_valueChanged(int value);
// void on_slideRollRateTest_valueChanged(int value);
void on_slideYawAngleTest_valueChanged(int value);
// void on_slidePitchRateTest_valueChanged(int value);
void on_slideRollRateTest_valueChanged(int value);
// void on_slideYawRateTest_valueChanged(int value);
void on_slidePitchRateTest_valueChanged(int value);
// void on_buttonStop_2_clicked();
#endif