From 8e76a12499442fabc3c976bfab9e06a36c3c29c8 Mon Sep 17 00:00:00 2001
From: Olivier Stasse <ostasse@laas.fr>
Date: Sun, 3 Dec 2023 21:51:17 +0100
Subject: [PATCH] [impl_test_sot_external_interface] Set again 1 KHz Use the
 callback group from the node python_interpreter.

---
 tests/impl_test_sot_external_interface.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/impl_test_sot_external_interface.cpp b/tests/impl_test_sot_external_interface.cpp
index c285411..59fa5fd 100644
--- a/tests/impl_test_sot_external_interface.cpp
+++ b/tests/impl_test_sot_external_interface.cpp
@@ -53,12 +53,16 @@ void ImplTestSotExternalInterface::init() {
 
   RosNodePtr py_inter_ptr = get_ros_node("python_interpreter");
   // Set the control time step parameter to 0.001
-  double ts = 0.01;
+  double ts = 0.001;
 
   // Publish parameters related to the control interface
   py_inter_ptr->declare_parameter<double>("/sot_controller/dt", ts);
   // Create services to interact with the embedded python interpreter.
-  py_interpreter_srv_->start_ros_service();
+
+  rclcpp::CallbackGroup::SharedPtr reentrant_cb_group;
+  reentrant_cb_group = get_callback_group("python_interpreter");
+  py_interpreter_srv_->start_ros_service(rclcpp::ServicesQoS(),
+                                         reentrant_cb_group);
 
   // Non blocking spinner to deal with ros.
   // Be careful: here with tests we do not care about real time issue.
-- 
GitLab