From 6991a34457e9c5e26874f158cb14767970ddc86c Mon Sep 17 00:00:00 2001 From: beuchatp <beuchatp@control.ee.ethz.ch> Date: Mon, 4 Dec 2017 17:30:36 +0100 Subject: [PATCH] Adjusted namespacing from the Parameter Service of the coordinator and to link with the Custom Controller --- pps_ws/src/d_fall_pps/param/SafeController.yaml | 2 +- pps_ws/src/d_fall_pps/src/CustomControllerService.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pps_ws/src/d_fall_pps/param/SafeController.yaml b/pps_ws/src/d_fall_pps/param/SafeController.yaml index 60efb448..d0e01482 100644 --- a/pps_ws/src/d_fall_pps/param/SafeController.yaml +++ b/pps_ws/src/d_fall_pps/param/SafeController.yaml @@ -1,5 +1,5 @@ #equlibrium offset -mass : 29 +mass : 30 #quadratic motor regression equation (a0, a1, a2) motorPoly: [5.484560e-4, 1.032633e-6, 2.130295e-11] diff --git a/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp b/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp index 6791781e..d13baf1b 100644 --- a/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp +++ b/pps_ws/src/d_fall_pps/src/CustomControllerService.cpp @@ -1138,7 +1138,7 @@ int main(int argc, char* argv[]) { // Set the class variable "namespace_to_own_agent_parameter_service" to be a the // namespace string for the parameter service that is running on the machine of this // agent - namespace_to_own_agent_parameter_service = "ParameterService"; + namespace_to_own_agent_parameter_service = m_namespace + "/ParameterService"; // Create a node handle to the parameter service running on this agent's machine ros::NodeHandle nodeHandle_to_own_agent_parameter_service(namespace_to_own_agent_parameter_service); @@ -1165,6 +1165,11 @@ int main(int argc, char* argv[]) { // "yamlReadyForFetchCallback" class function. ros::Subscriber controllerYamlReadyForFetchSubscriber_to_coordinator = nodeHandle_to_coordinator_parameter_service.subscribe("controllerYamlReadyForFetch", 1, yamlReadyForFetchCallback); + // Let the user know what namespaces are being used for linking to the parameter service + ROS_INFO_STREAM("The namespace string for accessing the Paramter Services are:"); + ROS_INFO_STREAM("namespace_to_own_agent_parameter_service = " << namespace_to_own_agent_parameter_service); + ROS_INFO_STREAM("namespace_to_coordinator_parameter_service = " << namespace_to_coordinator_parameter_service); + // Call the class function that loads the parameters for this class. fetchYamlParameters(nodeHandle_to_own_agent_parameter_service); -- GitLab