File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,8 @@ ControllerManager::ControllerManager(
284284 " [Deprecated] Passing the robot description parameter directly to the control_manager node "
285285 " is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead." );
286286 init_resource_manager (robot_description);
287+ init_services ();
287288 }
288-
289- init_services ();
290289}
291290
292291ControllerManager::ControllerManager (
@@ -311,7 +310,10 @@ ControllerManager::ControllerManager(
311310 {
312311 subscribe_to_robot_description_topic ();
313312 }
314- init_services ();
313+ else
314+ {
315+ init_services ();
316+ }
315317}
316318
317319void ControllerManager::subscribe_to_robot_description_topic ()
@@ -343,6 +345,7 @@ void ControllerManager::robot_description_callback(const std_msgs::msg::String &
343345 return ;
344346 }
345347 init_resource_manager (robot_description.data .c_str ());
348+ init_services ();
346349 }
347350 catch (std::runtime_error & e)
348351 {
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ class TestControllerManagerHWManagementSrvs : public TestControllerManagerSrvs
8181 " Unable to initialize resource manager, no robot description found." );
8282 }
8383
84- cm_->init_resource_manager (robot_description);
84+ auto msg = std_msgs::msg::String ();
85+ msg.data = robot_description;
86+ cm_->robot_description_callback (msg);
8587
8688 SetUpSrvsCMExecutor ();
8789 }
@@ -223,7 +225,9 @@ class TestControllerManagerHWManagementSrvsWithoutParams
223225 " Unable to initialize resource manager, no robot description found." );
224226 }
225227
226- cm_->init_resource_manager (robot_description);
228+ auto msg = std_msgs::msg::String ();
229+ msg.data = robot_description;
230+ cm_->robot_description_callback (msg);
227231
228232 SetUpSrvsCMExecutor ();
229233 }
You can’t perform that action at this time.
0 commit comments