diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp index 62271a73cafc3cc6148f03b3d90dd1fbd83a34dc..5447e708541251779203d0eca449638b8ba97421 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp @@ -39,7 +39,7 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : setpointPublisher = nodeHandle.advertise<Setpoint>("SafeControllerService/Setpoint", 1); setpointSubscriber = nodeHandle.subscribe("SafeControllerService/Setpoint", 1, &MainWindow::setpointCallback, this); - DBChangedSubscriber = nodeHandle.subscribe("my_GUI/DBChanged", 1, &MainWindow::DBChangedCallback, this); + DBChangedSubscriber = nodeHandle.subscribe("/my_GUI/DBChanged", 1, &MainWindow::DBChangedCallback, this); // communication with PPS Client, just to make it possible to communicate through terminal also we use PPSClient's name @@ -88,6 +88,7 @@ void MainWindow::enableGUI() void MainWindow::DBChangedCallback(const std_msgs::Int32& msg) { loadCrazyflieContext(); + ROS_INFO("context reloaded in student_GUI"); } void MainWindow::setpointCallback(const Setpoint& newSetpoint) diff --git a/pps_ws/src/d_fall_pps/src/PPSClient.cpp b/pps_ws/src/d_fall_pps/src/PPSClient.cpp index a135dddadb9f250c417f6253569bdad38a7b6cd3..0e68c1b153491cd174e75507c4d9aa9ea885b29b 100755 --- a/pps_ws/src/d_fall_pps/src/PPSClient.cpp +++ b/pps_ws/src/d_fall_pps/src/PPSClient.cpp @@ -467,7 +467,7 @@ int main(int argc, char* argv[]) safeControllerServiceSetpointPublisher = namespaceNodeHandle.advertise<d_fall_pps::Setpoint>("SafeControllerService/Setpoint", 1); // subscriber for DBChanged - ros::Subscriber DBChangedSubscriber = namespaceNodeHandle.subscribe("my_GUI/DBChanged", 1, DBChangedCallback); + ros::Subscriber DBChangedSubscriber = namespaceNodeHandle.subscribe("/my_GUI/DBChanged", 1, DBChangedCallback); //start with safe controller flying_state = STATE_MOTORS_OFF;