From c79b94c6e69da641ed2cfba9c64cc90c1c8c4ed8 Mon Sep 17 00:00:00 2001
From: beuchatp <beuchatp@control.ee.ethz.ch>
Date: Tue, 5 Dec 2017 07:37:10 +0100
Subject: [PATCH] Adjusted the node handles in the fetch callbacks

---
 pps_ws/src/d_fall_pps/src/CustomControllerService.cpp | 2 +-
 pps_ws/src/d_fall_pps/src/PPSClient.cpp               | 2 +-
 pps_ws/src/d_fall_pps/src/SafeControllerService.cpp   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp b/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp
index e1871be3..1dbde303 100644
--- a/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp
+++ b/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp
@@ -832,7 +832,7 @@ void yamlReadyForFetchCallback(const std_msgs::Int32& msg)
 			ROS_INFO("The CustomControllerService received the message that YAML parameters were (re-)loaded. > Now fetching the parameter values from the coordinator.");
 			// Create a node handle to the parameter service running on the coordinator machine
 			ros::NodeHandle nodeHandle_to_coordinator = ros::NodeHandle();
-			ros::NodeHandle nodeHandle_to_coordinator_parameter_service = ros::NodeHandle(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
+			ros::NodeHandle nodeHandle_to_coordinator_parameter_service(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
 			// Call the function that fetches the parameters
 			fetchYamlParameters(nodeHandle_to_coordinator_parameter_service);
 			break;
diff --git a/pps_ws/src/d_fall_pps/src/PPSClient.cpp b/pps_ws/src/d_fall_pps/src/PPSClient.cpp
index 6bfd449b..72ea2823 100755
--- a/pps_ws/src/d_fall_pps/src/PPSClient.cpp
+++ b/pps_ws/src/d_fall_pps/src/PPSClient.cpp
@@ -810,7 +810,7 @@ void yamlReadyForFetchCallback(const std_msgs::Int32& msg)
             ROS_INFO("The PPSClient received the message that YAML parameters were (re-)loaded for the Safe Controller. > Now fetching the parameter values from the coordinator.");
             // Create a node handle to the parameter service running on the coordinator machine
             ros::NodeHandle nodeHandle_to_coordinator = ros::NodeHandle();
-            ros::NodeHandle nodeHandle_to_coordinator_parameter_service = ros::NodeHandle(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
+            ros::NodeHandle nodeHandle_to_coordinator_parameter_service(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
             // Call the function that fetches the parameters
             fetchYamlParametersForSafeController(nodeHandle_to_coordinator_parameter_service);
             break;
diff --git a/pps_ws/src/d_fall_pps/src/SafeControllerService.cpp b/pps_ws/src/d_fall_pps/src/SafeControllerService.cpp
index 4a4d63cb..9ead5c48 100755
--- a/pps_ws/src/d_fall_pps/src/SafeControllerService.cpp
+++ b/pps_ws/src/d_fall_pps/src/SafeControllerService.cpp
@@ -403,7 +403,7 @@ void yamlReadyForFetchCallback(const std_msgs::Int32& msg)
             ROS_INFO("The SafeControllerService received the message that YAML parameters were (re-)loaded. > Now fetching the parameter values from the coordinator.");
             // Create a node handle to the parameter service running on the coordinator machine
             ros::NodeHandle nodeHandle_to_coordinator = ros::NodeHandle();
-            ros::NodeHandle nodeHandle_to_coordinator_parameter_service = ros::NodeHandle(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
+            ros::NodeHandle nodeHandle_to_coordinator_parameter_service(nodeHandle_to_coordinator,namespace_to_coordinator_parameter_service);
             // Call the function that fetches the parameters
             fetchYamlParameters(nodeHandle_to_coordinator_parameter_service);
             break;
-- 
GitLab