From f71b22363188ccc0a133e3bd9cf0416ba1577316 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Mon, 22 Jan 2024 10:19:22 +0100 Subject: [PATCH] Load the URDF to the resource_manager before parsing it to CM --- gz_ros2_control/src/gz_ros2_control_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index c1c8fb03..9ddb6bed 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -400,6 +400,11 @@ void GazeboSimROS2ControlPlugin::Configure( std::unique_ptr resource_manager_ = std::make_unique(); + try { + resource_manager_->load_urdf(urdf_string, false, false); + } catch (...) { + RCLCPP_ERROR(node_->get_logger(), "Error initializing URDF to resource manager!"); + } try { this->dataPtr->robot_hw_sim_loader_.reset( new pluginlib::ClassLoader(