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 f5bd257a authored by remartin's avatar remartin

Merge branch 'uwbmaster' of http://gitlab.ethz.ch/D-FaLL/PandS-System/D-FaLL-System into uwbmaster

parents 2de29a99 c0b4e29a
{
"files.associations": {
"iterator": "cpp",
"string": "cpp",
"string_view": "cpp",
"vector": "cpp"
}
}
\ No newline at end of file
......@@ -71,6 +71,7 @@ add_service_files(
CMUpdate.srv
CMCommand.srv
Anchors.srv
CFIndex.srv
)
## Generate actions in the 'action' folder
......
// Links the crazyflies with the student ids and with the crazyflie zones
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Links the crazyflies with the student ids and with the crazyflie zones
//
// ----------------------------------------------------------------------------------
#ifndef CFLINKER_H
#define CFLINKER_H
......
#ifndef TEACHERSERVICE_H
#define TEACHERSERVICE_H
#include "std_msgs/Int32.h"
#include "d_fall_pps/CrazyflieData.h"
#include "StudentSubscriber.h"
//#include "ros/ros.h"
namespace d_fall_pps
{
// Stores the connected student IDs
std::vector<int> studentIDs;
// and subscriptions
std::vector<StudentSubscriber> studentSubscribers;
// Callback once the refresh Student ID button is clicked
void refreshStudents_callback(const std_msgs::Int32 &msg);
// Updates the subscription to the localization data of the students
void subscribeLocalization();
ros::Publisher studentIDs_publisher;
ros::Publisher CFData_publisher;
}
#endif // TEACHERSERVICE_H included
\ No newline at end of file
// 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 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:
// Marker for the Crazyflie flying with UWB
//
// ----------------------------------------------------------------------------------
#ifndef UWBMARKER_H
#define UWBMARKER_H
......@@ -8,12 +45,12 @@
#include "d_fall_pps/UWBAnchor.h"
using namespace d_fall_pps;
#define ANCHOR_HEIGHT 200 * FROM_MILIMETERS_TO_UNITS * 1.2
#define ANCHOR_WIDTH 200 * FROM_MILIMETERS_TO_UNITS * 1.2
#define ANCHOR_OPACITY 0.7
using namespace d_fall_pps;
class UWBMarker : public QGraphicsSvgItem
{
public:
......
// Marker for the center of the Crazyflie Zone
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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 center of the Crazyflie Zone
//
// ----------------------------------------------------------------------------------
#ifndef CENTER_MARKER_H
#define CENTER_MARKER_H
......
// Cornergrabber that allows to dynamically change the size of tables and crazyflie zones
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Cornergrabber that allows to dynamically change the size of tables and crazyflie zones
//
// ----------------------------------------------------------------------------------
#ifndef CORNERGRABBER_H
#define CORNERGRABBER_H
......
// Crazyflie object, representation of a Crazyflie in the scene
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Crazyflie object, representation of a Crazyflie in the scene
//
// ----------------------------------------------------------------------------------
#ifndef CRAZYFLY_H
#define CRAZYFLY_H
......
// Rectangular zone that we will be able to link to a crazyflie
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Rectangular zone that we will be able to link to a crazyflie
//
// ----------------------------------------------------------------------------------
#ifndef CRAZYFLYZONE_H
#define CRAZYFLYZONE_H
......
// Tab that is created when we create a crazyflie zone
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Tab that is created when we create a crazyflie zone
//
// ----------------------------------------------------------------------------------
#ifndef CRAZYFLYZONETAB_H
#define CRAZYFLYZONETAB_H
......
// Useful global definitions
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Useful global definitions
//
// ----------------------------------------------------------------------------------
#ifndef GLOBAL_DEFINITIONS_H
#define GLOBAL_DEFINITIONS_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
......@@ -23,8 +44,10 @@
#include <QGridLayout>
#include <QGraphicsRectItem>
#ifdef CATKIN_MAKE
#include <std_msgs/Int32.h>
#include <std_msgs/Int32MultiArray.h>
#include "rosNodeThread.h"
#include "marker.h"
#include "crazyFly.h"
......@@ -33,12 +56,9 @@
#include "d_fall_pps/CrazyflieDB.h"
#include "d_fall_pps/CrazyflieEntry.h"
#include "d_fall_pps/CFIndex.h"
#include "d_fall_pps/Anchors.h"
#include <std_msgs/Int32.h>
#include <std_msgs/Int32MultiArray.h>
#define CMD_CRAZYFLY_MOTORS_OFF 5
using namespace d_fall_pps;
......@@ -185,7 +205,11 @@ private:
CFLinker* cf_linker;
std::vector<UWBMarker*> anchor_markers;
std::map<std::string, std::string> channel_LUT;
std::vector<crazyFly*> CF_vector;
ros::ServiceClient UWBServiceClient;
ros::ServiceClient TeacherServiceClient;
ros::Publisher DBChangedPublisher;
ros::Publisher emergencyStopPublisher;
......@@ -217,6 +241,10 @@ private:
bool updateUWBSettings(bool enableChecked);
void updateAnchors(const Anchors* const a);
void loadCFs(ros::NodeHandle& nh);
//void createCFObject(const CrazyfliePositionData)
};
......
// Abstract class to represent our reimplementation of QGraphicsRectItem. Will be the base
// for table and crazyflie zone.
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Abstract class to represent our reimplementation of QGraphicsRectItem. Will be the base
// for table and crazyflie zone.
//
// ----------------------------------------------------------------------------------
#ifndef MYGRAPHICSRECTITEM_H
#define MYGRAPHICSRECTITEM_H
......
// Our reimplementation of QGraphicsScene
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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:
// Our reimplementation of QGraphicsScene
//
// ----------------------------------------------------------------------------------
#ifndef MYGRAPHICSSCENE_H
#define MYGRAPHICSSCENE_H
......
// Our reimplementation of QGraphicsView
//
// Copyright (C) 2017 Angel Romero
// Copyright (C) 2017, ETH Zurich, D-ITET, 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/>.