From 825eb0ef13af9d4f08c7dfd9947b033d26bfd0b8 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Wed, 24 Jan 2024 10:29:50 +0100 Subject: [PATCH] Load the URDF to the resource_manager before parsing it to CM (#222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alejandro Hernández Cordero (cherry picked from commit 5a948050563881dba20effec3ccb678e4f375529) --- gz_ros2_control/src/gz_ros2_control_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index a97d859a..3ac18cae 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -393,6 +393,12 @@ void GazeboSimROS2ControlPlugin::Configure( std::unique_ptr resource_manager_ = std::make_unique(); + try { + resource_manager_->load_urdf(urdf_string, false, false); + } catch (...) { + RCLCPP_ERROR( + this->dataPtr->node_->get_logger(), "Error initializing URDF to resource manager!"); + } try { this->dataPtr->robot_hw_sim_loader_.reset( new pluginlib::ClassLoader(