Skip to content

Commit

Permalink
Initialize the controller manager services after initializing resourc…
Browse files Browse the repository at this point in the history
…e manager
  • Loading branch information
saikishor committed Jan 5, 2024
1 parent 64c9e2a commit 1f264f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ ControllerManager::ControllerManager(
"[Deprecated] Passing the robot description parameter directly to the control_manager node "
"is deprecated. Use '~/robot_description' topic from 'robot_state_publisher' instead.");
init_resource_manager(robot_description_);
init_services();
}

diagnostics_updater_.setHardwareID("ros2_control");
diagnostics_updater_.add(
"Controllers Activity", this, &ControllerManager::controller_activity_diagnostic_callback);
init_services();
}

ControllerManager::ControllerManager(
Expand All @@ -318,7 +318,6 @@ ControllerManager::ControllerManager(
diagnostics_updater_.setHardwareID("ros2_control");
diagnostics_updater_.add(
"Controllers Activity", this, &ControllerManager::controller_activity_diagnostic_callback);
init_services();
}

void ControllerManager::subscribe_to_robot_description_topic()
Expand Down Expand Up @@ -352,6 +351,7 @@ void ControllerManager::robot_description_callback(const std_msgs::msg::String &
return;
}
init_resource_manager(robot_description_);
init_services();
}
catch (std::runtime_error & e)
{
Expand Down

0 comments on commit 1f264f5

Please sign in to comment.