From 9ef55e94bd9184de60374576b081a12da66aa014 Mon Sep 17 00:00:00 2001 From: robin_shaun Date: Tue, 30 Mar 2021 23:19:39 +0800 Subject: [PATCH] add xtdgroundcontrol c++ --- communication/multi_vehicle_communication.sh | 4 +-- .../xtdgroundcontrol}/CMakeLists.txt | 10 +++---- .../cplusplus/xtdgroundcontrol}/README.md | 0 .../include/xtdgroundcontrol}/form.h | 4 +-- .../include/xtdgroundcontrol}/formrviz.h | 2 ++ .../include/xtdgroundcontrol}/main_window.hpp | 16 +++++------ .../include/xtdgroundcontrol}/qnode.hpp | 12 ++++---- .../include/xtdgroundcontrol}/qrviz.hpp | 2 +- .../cplusplus/xtdgroundcontrol}/mainpage.dox | 2 +- .../cplusplus/xtdgroundcontrol}/package.xml | 4 +-- .../xtdgroundcontrol}/resources/images.qrc | 0 .../resources/images/indoor1.jpg | Bin .../resources/images/indoor2.jpg | Bin .../resources/images/indoor3.jpg | Bin .../resources/images/outdoor1.jpg | Bin .../resources/images/outdoor2.jpg | Bin .../resources/images/outdoor3.jpg | Bin .../resources/images/robocup.jpg | Bin .../resources/images/xtd.ico | Bin .../cplusplus/xtdgroundcontrol}/src/form.cpp | 2 +- .../xtdgroundcontrol}/src/formrviz.cpp | 15 +++++++++- .../cplusplus/xtdgroundcontrol}/src/image.qrc | 0 .../cplusplus/xtdgroundcontrol}/src/main.cpp | 4 +-- .../xtdgroundcontrol}/src/main_window.cpp | 24 +++++++++------- .../cplusplus/xtdgroundcontrol}/src/qnode.cpp | 14 +++++----- .../cplusplus/xtdgroundcontrol}/src/qrviz.cpp | 12 ++++---- .../cplusplus/xtdgroundcontrol}/ui/form.ui | 0 .../xtdgroundcontrol}/ui/formrviz.ui | 0 .../xtdgroundcontrol}/ui/main_window.ui | 26 ------------------ .../python}/images/indoor1.jpg | Bin .../python}/images/indoor1_resize.jpg | Bin .../python}/images/indoor2.jpg | Bin .../python}/images/indoor2_resize.jpg | Bin .../python}/images/indoor3.jpg | Bin .../python}/images/indoor3_resize.jpg | Bin .../python}/images/outdoor1_resize.jpg | Bin .../python}/images/outdoor2.jpg | Bin .../python}/images/outdoor2_resize.jpg | Bin .../python}/images/outdoor3.jpg | Bin .../python}/images/outdoor3_resize.jpg | Bin .../python}/images/resize.py | 0 .../python}/images/robocup.jpg | Bin .../python}/images/robocup_resize.jpg | Bin .../python}/images/xtd.ico | Bin .../{gcs => XTDGroundControl/python}/main.py | 0 .../python}/plotcanvas.py | 0 .../python}/receive.py | 0 .../python}/resize.py | 0 .../python}/return.py | 0 .../python}/return.sh | 0 .../{gcs => XTDGroundControl/python}/send.py | 0 .../python}/stop_return.sh | 0 .../python}/xtd_ui.py | 0 53 files changed, 73 insertions(+), 80 deletions(-) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/CMakeLists.txt (87%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/README.md (100%) rename control/{gcs/develop/xtdrone_qt/include/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol}/form.h (84%) rename control/{gcs/develop/xtdrone_qt/include/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol}/formrviz.h (84%) rename control/{gcs/develop/xtdrone_qt/include/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol}/main_window.hpp (94%) rename control/{gcs/develop/xtdrone_qt/include/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol}/qnode.hpp (94%) rename control/{gcs/develop/xtdrone_qt/include/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol}/qrviz.hpp (97%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/mainpage.dox (95%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/package.xml (92%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images.qrc (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/indoor1.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/indoor2.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/indoor3.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/outdoor1.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/outdoor2.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/outdoor3.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/robocup.jpg (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/resources/images/xtd.ico (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/form.cpp (87%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/formrviz.cpp (57%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/image.qrc (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/main.cpp (87%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/main_window.cpp (98%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/qnode.cpp (98%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/src/qrviz.cpp (93%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/ui/form.ui (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/ui/formrviz.ui (100%) rename control/{gcs/develop/xtdrone_qt => XTDGroundControl/cplusplus/xtdgroundcontrol}/ui/main_window.ui (98%) rename control/{gcs => XTDGroundControl/python}/images/indoor1.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/indoor1_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/indoor2.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/indoor2_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/indoor3.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/indoor3_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/outdoor1_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/outdoor2.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/outdoor2_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/outdoor3.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/outdoor3_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/resize.py (100%) rename control/{gcs => XTDGroundControl/python}/images/robocup.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/robocup_resize.jpg (100%) rename control/{gcs => XTDGroundControl/python}/images/xtd.ico (100%) rename control/{gcs => XTDGroundControl/python}/main.py (100%) rename control/{gcs => XTDGroundControl/python}/plotcanvas.py (100%) rename control/{gcs => XTDGroundControl/python}/receive.py (100%) rename control/{gcs => XTDGroundControl/python}/resize.py (100%) rename control/{gcs => XTDGroundControl/python}/return.py (100%) rename control/{gcs => XTDGroundControl/python}/return.sh (100%) rename control/{gcs => XTDGroundControl/python}/send.py (100%) rename control/{gcs => XTDGroundControl/python}/stop_return.sh (100%) rename control/{gcs => XTDGroundControl/python}/xtd_ui.py (100%) diff --git a/communication/multi_vehicle_communication.sh b/communication/multi_vehicle_communication.sh index 7633032..e4338b7 100644 --- a/communication/multi_vehicle_communication.sh +++ b/communication/multi_vehicle_communication.sh @@ -1,6 +1,6 @@ #!/bin/bash -iris_num=6 -typhoon_h480_num=0 +iris_num=3 +typhoon_h480_num=2 solo_num=0 plane_num=0 rover_num=0 diff --git a/control/gcs/develop/xtdrone_qt/CMakeLists.txt b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/CMakeLists.txt similarity index 87% rename from control/gcs/develop/xtdrone_qt/CMakeLists.txt rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/CMakeLists.txt index e12dda6..2efce51 100644 --- a/control/gcs/develop/xtdrone_qt/CMakeLists.txt +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/CMakeLists.txt @@ -3,7 +3,7 @@ ############################################################################## cmake_minimum_required(VERSION 2.8.0) -project(xtdrone_qt) +project(xtdgroundcontrol) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/opt/ros/melodic/") ############################################################################## @@ -37,7 +37,7 @@ catkin_package() file(GLOB QT_FORMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ui/*.ui) file(GLOB QT_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} resources/*.qrc) -file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/xtdrone_qt/*.hpp *.h) +file(GLOB_RECURSE QT_MOC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINKS include/xtdgroundcontrol/*.hpp *.h) QT5_ADD_RESOURCES(QT_RESOURCES_CPP ${QT_RESOURCES}) QT5_WRAP_UI(QT_FORMS_HPP ${QT_FORMS}) @@ -53,7 +53,7 @@ file(GLOB_RECURSE QT_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} FOLLOW_SYMLINK # Binaries ############################################################################## -add_executable(xtdrone_qt ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}) -target_link_libraries(xtdrone_qt ${QT_LIBRARIES} ${catkin_LIBRARIES}) -install(TARGETS xtdrone_qt RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) +add_executable(xtdgroundcontrol ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP}) +target_link_libraries(xtdgroundcontrol ${QT_LIBRARIES} ${catkin_LIBRARIES}) +install(TARGETS xtdgroundcontrol RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) diff --git a/control/gcs/develop/xtdrone_qt/README.md b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/README.md similarity index 100% rename from control/gcs/develop/xtdrone_qt/README.md rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/README.md diff --git a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/form.h b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/form.h similarity index 84% rename from control/gcs/develop/xtdrone_qt/include/xtdrone_qt/form.h rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/form.h index 6069525..972a6a0 100644 --- a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/form.h +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/form.h @@ -1,5 +1,5 @@ -#ifndef xtdrone_qt_FORM_H -#define xtdrone_qt_FORM_H +#ifndef xtdgroundcontrol_FORM_H +#define xtdgroundcontrol_FORM_H #include diff --git a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/formrviz.h b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/formrviz.h similarity index 84% rename from control/gcs/develop/xtdrone_qt/include/xtdrone_qt/formrviz.h rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/formrviz.h index 302e47a..71f1227 100644 --- a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/formrviz.h +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/formrviz.h @@ -18,6 +18,8 @@ public: private slots: void on_button_image_cancel_clicked(); void on_button_image_ok_clicked(); + void slot_btn_addtopic_clicked(); + void slot_btn_other_clicked(); signals: void rviz_to_main(QString); diff --git a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/main_window.hpp b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/main_window.hpp similarity index 94% rename from control/gcs/develop/xtdrone_qt/include/xtdrone_qt/main_window.hpp rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/main_window.hpp index b11f89d..c2ce743 100644 --- a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/main_window.hpp +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/main_window.hpp @@ -1,12 +1,12 @@ /** - * @file /include/xtdrone_qt/main_window.hpp + * @file /include/xtdgroundcontrol/main_window.hpp * - * @brief Qt based gui for xtdrone_qt. + * @brief Qt based gui for xtdgroundcontrol. * * @date November 2010 **/ -#ifndef xtdrone_qt_MAIN_WINDOW_H -#define xtdrone_qt_MAIN_WINDOW_H +#ifndef xtdgroundcontrol_MAIN_WINDOW_H +#define xtdgroundcontrol_MAIN_WINDOW_H /***************************************************************************** ** Includes @@ -32,7 +32,7 @@ ** Namespace *****************************************************************************/ -namespace xtdrone_qt { +namespace xtdgroundcontrol { /***************************************************************************** ** Interface [MainWindow] @@ -141,7 +141,7 @@ public Q_SLOTS: void slot_display_Pose(int); void slot_btn_add_click(bool); void slot_addrviz(QString); - void slot_btn_estimate_click(bool); +// void slot_btn_estimate_click(bool); void slot_btn_goal_click(bool); void slot_rviz_control(); private: @@ -151,6 +151,6 @@ private: qrviz* my_rviz; }; -} // namespace xtdrone_qt +} // namespace xtdgroundcontrol -#endif // xtdrone_qt_MAIN_WINDOW_H +#endif // xtdgroundcontrol_MAIN_WINDOW_H diff --git a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qnode.hpp b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qnode.hpp similarity index 94% rename from control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qnode.hpp rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qnode.hpp index 441a8cf..c74c23e 100644 --- a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qnode.hpp +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qnode.hpp @@ -1,5 +1,5 @@ /** - * @file /include/xtdrone_qt/qnode.hpp + * @file /include/xtdgroundcontrol/qnode.hpp * * @brief Communications central! * @@ -9,8 +9,8 @@ ** Ifdefs *****************************************************************************/ -#ifndef xtdrone_qt_QNODE_HPP_ -#define xtdrone_qt_QNODE_HPP_ +#ifndef xtdgroundcontrol_QNODE_HPP_ +#define xtdgroundcontrol_QNODE_HPP_ /***************************************************************************** ** Includes @@ -41,7 +41,7 @@ ** Namespaces *****************************************************************************/ -namespace xtdrone_qt { +namespace xtdgroundcontrol { /***************************************************************************** ** Class @@ -133,6 +133,6 @@ private: }; -} // namespace xtdrone_qt +} // namespace xtdgroundcontrol -#endif /* xtdrone_qt_QNODE_HPP_ */ +#endif /* xtdgroundcontrol_QNODE_HPP_ */ diff --git a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qrviz.hpp b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qrviz.hpp similarity index 97% rename from control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qrviz.hpp rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qrviz.hpp index c217cf0..ed8a094 100644 --- a/control/gcs/develop/xtdrone_qt/include/xtdrone_qt/qrviz.hpp +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/include/xtdgroundcontrol/qrviz.hpp @@ -20,7 +20,7 @@ public: void Display_LaserScan(QString laser_topic, bool enable); void Display_Image(QString Image_topic, bool enable, int num); void Display_Pose(QString pose_topic, QString pose_shape, QColor color, bool enable, int num); - void Set_start_pose(); +// void Set_start_pose(); void Set_goal_pose(); private: rviz::RenderPanel* render_panel; diff --git a/control/gcs/develop/xtdrone_qt/mainpage.dox b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/mainpage.dox similarity index 95% rename from control/gcs/develop/xtdrone_qt/mainpage.dox rename to control/XTDGroundControl/cplusplus/xtdgroundcontrol/mainpage.dox index 107b7a1..1319e0c 100644 --- a/control/gcs/develop/xtdrone_qt/mainpage.dox +++ b/control/XTDGroundControl/cplusplus/xtdgroundcontrol/mainpage.dox @@ -2,7 +2,7 @@ \mainpage \htmlinclude manifest.html -\b xtdrone_qt is ... +\b xtdgroundcontrol is ...