Repository: moveit/moveit2 (C++)

Issue:
Restore namespace in MoveIt Servo parameters
It seems that https://github.com/ros-planning/moveit2/pull/2096 removed the namespace in the servo parameters.

These should be added back in, as the removal of the `moveit_servo` namespace changes the level at which user parameters are specified (for example, we had to do that in MoveIt Studio).

This can be changed by adding the namespace in the constructor of the parameter listener.




Fix (patch):
diff --git a/moveit_ros/moveit_servo/launch/pose_tracking_example.launch.py b/moveit_ros/moveit_servo/launch/pose_tracking_example.launch.py
index 634da7d3d7..aac0882bab 100644
--- a/moveit_ros/moveit_servo/launch/pose_tracking_example.launch.py
+++ b/moveit_ros/moveit_servo/launch/pose_tracking_example.launch.py
@@ -14,16 +14,17 @@ def generate_launch_description():
     )
 
     # Get parameters for the Pose Tracking node
-    pid_params = (
-        ParameterBuilder("moveit_servo")
+    pose_tracker_params = {
+        "moveit_servo": ParameterBuilder("moveit_servo")
         .yaml("config/pose_tracking_settings.yaml")
         .to_dict()
-    )
-    servo_params = (
-        ParameterBuilder("moveit_servo")
+    }
+
+    servo_params = {
+        "moveit_servo": ParameterBuilder("moveit_servo")
         .yaml("config/panda_simulated_config_pose_tracking.yaml")
         .to_dict()
-    )
+    }
 
     # RViz
     rviz_config_file = (
@@ -62,7 +63,7 @@ def generate_launch_description():
         executable="servo_pose_tracking_demo",
         # prefix=['xterm -e gdb -ex run --args'],
         output="screen",
-        parameters=[moveit_config.to_dict(), servo_params, pid_params],
+        parameters=[moveit_config.to_dict(), servo_params, pose_tracker_params],
     )
 
     # ros2_control using FakeSystem as hardware
diff --git a/moveit_ros/moveit_servo/launch/servo_example.launch.py b/moveit_ros/moveit_servo/launch/servo_example.launch.py
index 20ce3c46bd..c235e6b2af 100644
--- a/moveit_ros/moveit_servo/launch/servo_example.launch.py
+++ b/moveit_ros/moveit_servo/launch/servo_example.launch.py
@@ -14,11 +14,12 @@ def generate_launch_description():
     )
 
     # Get parameters for the Servo node
-    servo_params = (
-        ParameterBuilder("moveit_servo")
+    servo_params = {
+        "moveit_servo": ParameterBuilder("moveit_servo")
         .yaml("config/panda_simulated_config.yaml")
         .to_dict()
-    )
+    }
+
     # This filter parameter should be >1. Increase it for greater smoothing but slower motion.
     low_pass_filter_coeff = {"butterworth_filter_coeff": 1.5}
 
diff --git a/moveit_ros/moveit_servo/src/cpp_interface_demo/pose_tracking_demo.cpp b/moveit_ros/moveit_servo/src/cpp_interface_demo/pose_tracking_demo.cpp
index 43168ff0d4..2f52cf1657 100644
--- a/moveit_ros/moveit_servo/src/cpp_interface_demo/pose_tracking_demo.cpp
+++ b/moveit_ros/moveit_servo/src/cpp_interface_demo/pose_tracking_demo.cpp
@@ -89,7 +89,7 @@ int main(int argc, char** argv)
   executor.add_node(node);
   std::thread executor_thread([&executor]() { executor.spin(); });
 
-  auto servo_param_listener = std::make_unique<const servo::ParamListener>(node);
+  auto servo_param_listener = std::make_unique<const servo::ParamListener>(node, "moveit_servo");
   auto servo_parameters = servo_param_listener->get_params();
 
   // Load the planning scene monitor
diff --git a/moveit_ros/moveit_servo/src/servo_node.cpp b/moveit_ros/moveit_servo/src/servo_node.cpp
index e294459fc3..17d7c11a7e 100644
--- a/moveit_ros/moveit_servo/src/servo_node.cpp
+++ b/moveit_ros/moveit_servo/src/servo_node.cpp
@@ -68,7 +68,7 @@ ServoNode::ServoNode(const rclcpp::NodeOptions& options)
   node_->get_parameter_or("robot_description_name", robot_description_name, robot_description_name);
 
   // Get the servo parameters
-  auto param_listener = std::make_unique<const servo::ParamListener>(node_);
+  auto param_listener = std::make_unique<const servo::ParamListener>(node_, "moveit_servo");
   auto servo_parameters = param_listener->get_params();
   // Validate the parameters first.
   validateParams(servo_parameters);