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 c416864c authored by flashingx's avatar flashingx
Browse files

Added copyright header to all the files

parent d6bc7704
// Marker for the Crazyflie flying with UWB.
//
// Copyright (C) 2018
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from centerMarker of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Marker for the Crazyflie flying with UWB
//
// ----------------------------------------------------------------------------------
#ifndef UWBMARKER_H
#define UWBMARKER_H
......
// Teacher's GUI main window header.
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from mainguiwindow of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Teacher's GUI main window.
//
// ----------------------------------------------------------------------------------
#ifndef MAINGUIWINDOW_H
#define MAINGUIWINDOW_H
......
// Creates a thread that runs the ros node.
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from rosNodeThread of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Creates a thread that runs the ros node.
//
// ----------------------------------------------------------------------------------
#ifndef ___ROSNODETHREAD_H___
#define ___ROSNODETHREAD_H___
......
// Marker for the Crazyflie flying with UWB.
//
// Copyright (C) 2018
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from centerMarker of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Marker for the Crazyflie flying with UWB
//
// ----------------------------------------------------------------------------------
#include <stdio.h>
......
// Teacher's GUI main window.
//
// Copyright (C) 2018
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from the GUI of Angel Romero.
// Adapted from mainguiwindow of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Teacher's GUI main window.
//
// ----------------------------------------------------------------------------------
#include <regex>
#include <string>
......@@ -54,6 +69,7 @@
#define N_MAX_CRAZYFLIES 20 // protection number
// UWB definitions, have to match on nodes receiving these states
#define UWB_UPDATE_DISABLE 0
#define UWB_UPDATE_ENABLE 1
#define UWB_UPDATE_ANCHORS 5
......@@ -242,7 +258,6 @@ void MainGUIWindow::_init()
refreshStudents_publisher = nodeHandle.advertise<std_msgs::Int32>("refreshStudents", 1);
UWBServiceClientUpdate_publisher = nodeHandle.advertise<std_msgs::Int32>("UWBUpdate", 1);
// TODO RENAME
UWBSettings_publisher = nodeHandle.advertise<std_msgs::Int32>("enableUWB", 1);
QObject::connect(ui->checkBox_enable_UWB, SIGNAL(stateChanged(int)), this, SLOT(on_checkBox_enable_UWB_toggled(bool)));
......
// Creates a thread that runs the ros node.
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from rosNodeThread of Angel Romero.
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Creates a thread that runs the ros node.
//
// ----------------------------------------------------------------------------------
#include "rosNodeThread.h"
......
// Main window of the Student's GUI
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from MainWindow of Angel Romero.
//
// Copyright (C) 2017 Angel Romero
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Students's GUI main window.
//
// ----------------------------------------------------------------------------------
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
......
// Takes care of creating a ros node thread.
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from rosNodeThread of Angel Romero.
//
// Copyright (C) 2017 Angel Romero
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Creates a thread that runs the ros node.
//
// ----------------------------------------------------------------------------------
#ifndef ___ROSNODETHREAD_H___
#define ___ROSNODETHREAD_H___
......
// Main window of the Student's GUI
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from MainWindow of Angel Romero.
//
// Copyright (C) 2017 Angel Romero
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Students's GUI main window.
//
// ----------------------------------------------------------------------------------
#include "MainWindow.h"
#include "ui_MainWindow.h"
......@@ -91,8 +111,6 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
centralManager = nodeHandle.serviceClient<CMQuery>("/CentralManagerService/Query", false);
loadCrazyflieContext();
std::vector<float> default_setpoint(4);
ros::NodeHandle nh_safeControllerService(m_ros_namespace + "/SafeControllerService");
......@@ -103,7 +121,6 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
ROS_ERROR_STREAM("couldn't find parameter 'defaultSetpoint'");
}
ui->current_setpoint_x->setText(QString::number(default_setpoint[0]));
ui->current_setpoint_y->setText(QString::number(default_setpoint[1]));
ui->current_setpoint_z->setText(QString::number(default_setpoint[2]));
......@@ -114,8 +131,7 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) :
ui->label_battery->setStyleSheet("QLabel { color : red; }");
m_battery_state = BATTERY_STATE_NORMAL;
// NEW STUFF
// Subscribe to UWB related topics and fetch current status
UWBServiceClient = nodeHandle.serviceClient<Anchors>("/UWBManagerService/UWBData", false);
UWBActivatedPublisher = my_nodeHandle.advertise<std_msgs::Int32>("uwbChanged", 1);
updateUWBState();
......@@ -359,8 +375,6 @@ void MainWindow::on_load_safe_yaml_button_clicked()
ROS_INFO_STREAM(cmd);
}
void MainWindow::customYamlFileTimerCallback(const ros::TimerEvent&)
{
// send msg that says that parameters have changed in YAML file
......
// Takes care of creating a ros node thread.
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// Adapted from rosNodeThread of Angel Romero.
//
// Copyright (C) 2017 Angel Romero
//
// This program is free software: you can redistribute it and/or modify
// 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.
//
// This program is distributed in the hope that it will be useful,
//
// 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 this program. If not, see <http://www.gnu.org/licenses/>.
// 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:
// Creates a thread that runs the ros node.
//
// ----------------------------------------------------------------------------------
#include "rosNodeThread_student.h"
......@@ -41,7 +61,6 @@ rosNodeThread::~rosNodeThread()
ros::shutdown();
ros::waitForShutdown();
} // end if
//m_pThread->wait();
} // end destructor
bool rosNodeThread::init()
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Alternate controller that is expected to work.
# Copyright (C) 2017 Angel Romero, Cyrill Burgener, Marco Mueller, Philipp Friedli
# Copyright (C) 2018, ETH Zurich, D-ITET
# Yvan Bosshard byvan @ee.ethz.ch
# Michael Rogenmoser michaero @ee.ethz.ch
# Tiago Salzmann tiagos @ee.ethz.ch
#
# Adapted from CrazyRadio of Angel Romero, Cyrill Burgener, Marco Mueller, Philipp Friedli.
#
# 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:
# Alternate controller that is expected to work.
#
# ----------------------------------------------------------------------------------
# This program 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.
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
import roslib; roslib.load_manifest('d_fall_pps')
import rospy
......
// Copyright (C) 2018, ETH Zurich, D-ITET
// Yvan Bosshard byvan @ee.ethz.ch
// Michael Rogenmoser michaero @ee.ethz.ch
// Tiago Salzmann tiagos @ee.ethz.ch
//
// 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