diff --git a/.travis.yml b/.travis.yml index 82410601..3121258d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,24 @@ # Stdr Simulator Travis Continuous Integration Configuration File # Author: Christos Zalidis +# Maintained: Greg Lee (CWRU) sudo: required -dist: trusty +dist: foxy language: generic compiler: - gcc notifications: email: recipients: - - etsardou@gmail.com - - zalidis@gmail.com - - aris.thallas@gmail.com + - leegs@case.edu on_success: change #[always|never|change] # default: change on_failure: change #[always|never|change] # default: always before_install: # Use this to prepare the system to install prerequisites or dependencies # Define some config vars - - export ROS_DISTRO=indigo + - export ROS_DISTRO=noetic - export CI_SOURCE_PATH=$(pwd) - export REPOSITORY_NAME=${PWD##*/} - echo "Testing branch $TRAVIS_BRANCH of $REPOSITORY_NAME" - - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list' + - sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu foxy main" > /etc/apt/sources.list.d/ros-latest.list' - wget http://packages.ros.org/ros.key -O - | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin ros-$ROS_DISTRO-ros diff --git a/stdr_gui/CMakeLists.txt b/stdr_gui/CMakeLists.txt index 6e4ce682..1520431c 100644 --- a/stdr_gui/CMakeLists.txt +++ b/stdr_gui/CMakeLists.txt @@ -17,15 +17,16 @@ include_directories( include ${catkin_INCLUDE_DIRS} ) -find_package(Qt4 REQUIRED COMPONENTS - QtCore - QtGui - QtUiTools +find_package(Qt5 REQUIRED COMPONENTS + Core + Gui + UiTools + Widgets ) ADD_DEFINITIONS(-DQT_NO_KEYWORDS) -include(${QT_USE_FILE}) +#include(${QT_USE_FILE}) include_directories( ${CMAKE_CURRENT_BINARY_DIR} @@ -33,7 +34,10 @@ include_directories( catkin_package( DEPENDS - QT + Qt5Core + Qt5Gui + Qt5UiTools + Qt5Widgets CATKIN_DEPENDS roscpp roslib @@ -44,6 +48,7 @@ catkin_package( stdr_parser sensor_msgs nav_msgs + qt_gui #INCLUDE_DIRS #LIBRARIES ) @@ -60,7 +65,7 @@ set(QT_FORMS ui/thermalSensorProperties.ui ui/soundSensorProperties.ui ) -QT4_WRAP_UI(QT_FORMS_HPP ${QT_FORMS}) +qt5_wrap_ui(QT_FORMS_HPP ${QT_FORMS}) QT_WRAP_CPP(stdr_gui_node SAMPLE_MOC_SRCS include/stdr_gui/stdr_gui_controller.h) QT_WRAP_CPP(stdr_gui_node SAMPLE_MOC_SRCS include/stdr_gui/stdr_gui_connector.h) @@ -115,7 +120,10 @@ add_executable(stdr_gui_node add_dependencies(stdr_gui_node ${stdr_msgs_EXPORTED_TARGETS}) # Wait for stdr_msgs to build target_link_libraries(stdr_gui_node ${catkin_LIBRARIES} - ${QT_LIBRARIES} + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5UiTools_LIBRARIES} + ${Qt5Widgets_LIBRARIES} ) # Install launch files diff --git a/stdr_gui/include/stdr_gui/stdr_tools.h b/stdr_gui/include/stdr_gui/stdr_tools.h index 9ecd89e5..62629b7b 100644 --- a/stdr_gui/include/stdr_gui/stdr_tools.h +++ b/stdr_gui/include/stdr_gui/stdr_tools.h @@ -36,33 +36,34 @@ #include #include -#include -#include -#include -#include -#include +#include +#include + +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/stdr_gui/package.xml b/stdr_gui/package.xml index 11656142..ab95cb6a 100644 --- a/stdr_gui/package.xml +++ b/stdr_gui/package.xml @@ -26,8 +26,15 @@ sensor_msgs nav_msgs - libqt4-dev - libqt4 + libqt5-core + libqt5-gui + libqt5-widgets + qt_gui + libqt5-core + libqt5-gui + libqt5-widgets + qt_gui + map_server diff --git a/stdr_gui/src/stdr_gui/stdr_gui_controller.cpp b/stdr_gui/src/stdr_gui/stdr_gui_controller.cpp index 33e3d44b..69d15552 100644 --- a/stdr_gui/src/stdr_gui/stdr_gui_controller.cpp +++ b/stdr_gui/src/stdr_gui/stdr_gui_controller.cpp @@ -223,9 +223,12 @@ namespace stdr_gui this, SLOT(robotReplaceSet(QPoint,std::string))); timer_ = new QTimer(this); + connect( timer_, SIGNAL(timeout()), this, SLOT(updateMapInternal())); + + timer_->start(50); QObject::connect( this,SIGNAL(waitForRfidPose()), @@ -315,6 +318,7 @@ namespace stdr_gui this, SIGNAL(setSoundSensorVisibility(QString,QString,char)), &info_connector_, SLOT(setSoundSensorVisibility(QString,QString,char))); } + /** @brief Sets up the main window widgets @@ -513,17 +517,18 @@ namespace stdr_gui elapsed_time_.start(); - map_initialized_ = true; + // map_initialized_ = true; map_connector_.setMapInitialized(true); gui_connector_.setMapInitialized(true); - timer_->start(50); + // timer_->start(50); robot_subscriber_ = n_.subscribe( "stdr_server/active_robots", 1, &CGuiController::receiveRobots, this); + map_initialized_ = true; } /** @@ -1005,6 +1010,10 @@ namespace stdr_gui **/ void CGuiController::updateMapInternal(void) { + if ( ! map_initialized_ ) + { + return; + } while(map_lock_) { usleep(100); diff --git a/stdr_gui/src/stdr_gui/stdr_robot_creator/stdr_robot_creator_connector.cpp b/stdr_gui/src/stdr_gui/stdr_robot_creator/stdr_robot_creator_connector.cpp index 5cd76430..17039220 100644 --- a/stdr_gui/src/stdr_gui/stdr_robot_creator/stdr_robot_creator_connector.cpp +++ b/stdr_gui/src/stdr_gui/stdr_robot_creator/stdr_robot_creator_connector.cpp @@ -1662,8 +1662,7 @@ namespace stdr_gui QApplication::translate( "Footprint point", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_footprint_point_ = item; @@ -1720,8 +1719,7 @@ namespace stdr_gui QApplication::translate( "LaserProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_laser_ = item; @@ -2242,8 +2240,7 @@ namespace stdr_gui QApplication::translate( "SonarProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_sonar_ = item; @@ -2287,8 +2284,7 @@ namespace stdr_gui QApplication::translate( "RfidAntennaProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_rfid_ = item; @@ -2330,8 +2326,7 @@ namespace stdr_gui QApplication::translate( "CO2SensorProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_co2_sensor_ = item; @@ -2370,8 +2365,7 @@ namespace stdr_gui QApplication::translate( "ThermalSensorProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_thermal_sensor_ = item; @@ -2410,8 +2404,7 @@ namespace stdr_gui QApplication::translate( "SoundSensorProperties", item->text(0).toStdString().c_str(), - 0, - QApplication::UnicodeUTF8)); + 0)); current_sound_sensor_ = item; diff --git a/stdr_resources/resources/specifications/stdr_specifications.xml b/stdr_resources/resources/specifications/stdr_specifications.xml index 07479edf..c6e797e6 100644 --- a/stdr_resources/resources/specifications/stdr_specifications.xml +++ b/stdr_resources/resources/specifications/stdr_specifications.xml @@ -24,7 +24,7 @@ - initial_pose,footprint,laser,sonar,rfid_reader,kinematic + initial_pose,footprint,laser,sonar,rfid_reader,kinematic,co2_sensor