From 6e5312ee50e27dbfa1a49e4ed01375c32b9e4af6 Mon Sep 17 00:00:00 2001 From: ad-daniel <44834743+ad-daniel@users.noreply.github.com> Date: Fri, 30 Sep 2022 10:54:28 +0200 Subject: [PATCH] Remove external urdf2webots dependency (#477) * Remove external dependency * Minor --- webots_ros2_driver/package.xml | 2 +- webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webots_ros2_driver/package.xml b/webots_ros2_driver/package.xml index 5e77f0eec..f0dd88a52 100644 --- a/webots_ros2_driver/package.xml +++ b/webots_ros2_driver/package.xml @@ -25,7 +25,7 @@ vision_msgs tinyxml2_vendor webots_ros2_msgs - urdf2webots-pip + webots_ros2_importer ament_lint_auto ament_lint_common diff --git a/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py b/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py index 8b9fb3fc8..b15268fab 100755 --- a/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py +++ b/webots_ros2_driver/webots_ros2_driver/ros2_supervisor.py @@ -23,11 +23,13 @@ import rclpy import webots_ros2_driver_webots +import webots_ros2_importer from rclpy.time import Time from rclpy.node import Node from rclpy.qos import qos_profile_services_default from rosgraph_msgs.msg import Clock from std_msgs.msg import String +sys.path.insert(1, os.path.join(os.path.dirname(webots_ros2_importer.__file__), 'urdf2webots')) from urdf2webots.importer import convertUrdfFile, convertUrdfContent from webots_ros2_msgs.srv import SpawnUrdfRobot