Skip to content

Commit 8e76a12

Browse files
[impl_test_sot_external_interface]
Set again 1 KHz Use the callback group from the node python_interpreter.
1 parent 84de1b7 commit 8e76a12

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/impl_test_sot_external_interface.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,16 @@ void ImplTestSotExternalInterface::init() {
5353

5454
RosNodePtr py_inter_ptr = get_ros_node("python_interpreter");
5555
// Set the control time step parameter to 0.001
56-
double ts = 0.01;
56+
double ts = 0.001;
5757

5858
// Publish parameters related to the control interface
5959
py_inter_ptr->declare_parameter<double>("/sot_controller/dt", ts);
6060
// Create services to interact with the embedded python interpreter.
61-
py_interpreter_srv_->start_ros_service();
61+
62+
rclcpp::CallbackGroup::SharedPtr reentrant_cb_group;
63+
reentrant_cb_group = get_callback_group("python_interpreter");
64+
py_interpreter_srv_->start_ros_service(rclcpp::ServicesQoS(),
65+
reentrant_cb_group);
6266

6367
// Non blocking spinner to deal with ros.
6468
// Be careful: here with tests we do not care about real time issue.

0 commit comments

Comments
 (0)