@@ -362,42 +362,27 @@ void ControllerManager::init_resource_manager(const std::string & robot_descript
362362 using lifecycle_msgs::msg::State;
363363
364364 std::vector<std::string> configure_components_on_start = std::vector<std::string>({});
365- if (get_parameter (" configure_components_on_start" , configure_components_on_start))
365+ get_parameter (" configure_components_on_start" , configure_components_on_start);
366+ rclcpp_lifecycle::State inactive_state (
367+ State::PRIMARY_STATE_INACTIVE, hardware_interface::lifecycle_state_names::INACTIVE);
368+ for (const auto & component : configure_components_on_start)
366369 {
367- RCLCPP_WARN_STREAM (
368- get_logger (),
369- " [Deprecated]: Usage of parameter \" activate_components_on_start\" is deprecated. Use "
370- " hardware_spawner instead." );
371- rclcpp_lifecycle::State inactive_state (
372- State::PRIMARY_STATE_INACTIVE, hardware_interface::lifecycle_state_names::INACTIVE);
373- for (const auto & component : configure_components_on_start)
374- {
375- resource_manager_->set_component_state (component, inactive_state);
376- }
370+ resource_manager_->set_component_state (component, inactive_state);
377371 }
378372
379373 std::vector<std::string> activate_components_on_start = std::vector<std::string>({});
380- if (get_parameter (" activate_components_on_start" , activate_components_on_start))
374+ get_parameter (" activate_components_on_start" , activate_components_on_start);
375+ rclcpp_lifecycle::State active_state (
376+ State::PRIMARY_STATE_ACTIVE, hardware_interface::lifecycle_state_names::ACTIVE);
377+ for (const auto & component : activate_components_on_start)
381378 {
382- RCLCPP_WARN_STREAM (
383- get_logger (),
384- " [Deprecated]: Usage of parameter \" activate_components_on_start\" is deprecated. Use "
385- " hardware_spawner instead." );
386- rclcpp_lifecycle::State active_state (
387- State::PRIMARY_STATE_ACTIVE, hardware_interface::lifecycle_state_names::ACTIVE);
388- for (const auto & component : activate_components_on_start)
389- {
390- resource_manager_->set_component_state (component, active_state);
391- }
379+ resource_manager_->set_component_state (component, active_state);
392380 }
381+
393382 // if both parameter are empty or non-existing preserve behavior where all components are
394383 // activated per default
395384 if (configure_components_on_start.empty () && activate_components_on_start.empty ())
396385 {
397- RCLCPP_WARN_STREAM (
398- get_logger (),
399- " [Deprecated]: Automatic activation of all hardware components will not be supported in the "
400- " future anymore. Use hardware_spawner instead." );
401386 resource_manager_->activate_all_components ();
402387 }
403388}
0 commit comments