diff --git a/setup.py b/setup.py index 9dd9e81..21e50d1 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='urdf2webots', - version='2023.1.0', + version='2025.0.0', author='Cyberbotics', author_email='support@cyberbotics.com', description='A converter between URDF and PROTO files.', diff --git a/tests/expected/Human.proto b/tests/expected/Human.proto index 1b8725d..b36da3e 100644 --- a/tests/expected/Human.proto +++ b/tests/expected/Human.proto @@ -1,4 +1,4 @@ -#VRML_SIM R2023b utf8 +#VRML_SIM R2025a utf8 # license: Apache License 2.0 # license url: http://www.apache.org/licenses/LICENSE-2.0 # This is a proto file for Webots for the Human diff --git a/tests/expected/KukaLbrIiwa14R820.proto b/tests/expected/KukaLbrIiwa14R820.proto index 54634fe..c7ef751 100644 --- a/tests/expected/KukaLbrIiwa14R820.proto +++ b/tests/expected/KukaLbrIiwa14R820.proto @@ -1,4 +1,4 @@ -#VRML_SIM R2023b utf8 +#VRML_SIM R2025a utf8 # license: Apache License 2.0 # license url: http://www.apache.org/licenses/LICENSE-2.0 # This is a proto file for Webots for the KukaLbrIiwa14R820 diff --git a/tests/expected/MotomanSia20d.proto b/tests/expected/MotomanSia20d.proto index b73c15a..d192753 100644 --- a/tests/expected/MotomanSia20d.proto +++ b/tests/expected/MotomanSia20d.proto @@ -1,4 +1,4 @@ -#VRML_SIM R2023b utf8 +#VRML_SIM R2025a utf8 # license: Apache License 2.0 # license url: http://www.apache.org/licenses/LICENSE-2.0 # This is a proto file for Webots for the MotomanSia20d diff --git a/tests/expected/RobotWithDummyLink.proto b/tests/expected/RobotWithDummyLink.proto index 38b149b..0a925c9 100644 --- a/tests/expected/RobotWithDummyLink.proto +++ b/tests/expected/RobotWithDummyLink.proto @@ -1,4 +1,4 @@ -#VRML_SIM R2023b utf8 +#VRML_SIM R2025a utf8 # license: Apache License 2.0 # license url: http://www.apache.org/licenses/LICENSE-2.0 # This is a proto file for Webots for the RobotWithDummyLink diff --git a/tests/expected/RobotWithLocalMeshes.proto b/tests/expected/RobotWithLocalMeshes.proto index 5224eb5..7fc1e61 100644 --- a/tests/expected/RobotWithLocalMeshes.proto +++ b/tests/expected/RobotWithLocalMeshes.proto @@ -1,4 +1,4 @@ -#VRML_SIM R2023b utf8 +#VRML_SIM R2025a utf8 # license: Apache License 2.0 # license url: http://www.apache.org/licenses/LICENSE-2.0 # This is a proto file for Webots for the RobotWithLocalMeshes diff --git a/urdf2webots/importer.py b/urdf2webots/importer.py index 379d17e..0e29a3b 100755 --- a/urdf2webots/importer.py +++ b/urdf2webots/importer.py @@ -60,7 +60,7 @@ def mkdirSafe(directory): def convertUrdfFile(input=None, output=None, robotName=None, normal=False, boxCollision=False, toolSlot=None, initTranslation='0 0 0', initRotation='0 0 1 0', - initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2023b'): + initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2025a'): """Convert a URDF file into a Webots PROTO file or Robot node string.""" urdfContent = None if not input: @@ -95,7 +95,7 @@ def convertUrdfFile(input=None, output=None, robotName=None, normal=False, boxCo def convertUrdfContent(input, output=None, robotName=None, normal=False, boxCollision=False, toolSlot=None, initTranslation='0 0 0', initRotation='0 0 1 0', - initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2023b'): + initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2025a'): """ Convert a URDF content string into a Webots PROTO file or Robot node string. The current working directory will be used for relative paths in your URDF file. @@ -177,7 +177,7 @@ def convertUrdfContent(input, output=None, robotName=None, normal=False, boxColl sys.stderr.write('ROS not sourced, package "%s" will not be found.\n' % packageName) if os.path.split(directory)[1]: packagePath = os.path.split(directory)[0] - packagePath = packagePath.replace("\\","/") + packagePath = packagePath.replace("\\", "/") input = input.replace('package://' + packageName, packagePath + '/' + packageName) else: sys.stderr.write('Can\'t determine package root path.\n') @@ -326,8 +326,8 @@ def convertUrdfContent(input, output=None, robotName=None, normal=False, boxColl parser.add_argument('--relative-path-prefix', dest='relativePathPrefix', default=None, help='If set and --input not specified, relative paths in your URDF file will be treated relatively ' 'to it rather than relatively to the current directory from which the script is called.') - parser.add_argument('--target', dest='targetVersion', default='R2023b', - choices=['R2023b', 'R2023a', 'R2022b', 'R2022a', 'R2021b', 'R2021a', 'R2020b', 'R2020a'], + parser.add_argument('--target', dest='targetVersion', default='R2025a', + choices=['R2025a', 'R2023b', 'R2023a', 'R2022b', 'R2022a', 'R2021b', 'R2021a', 'R2020b', 'R2020a'], help='Sets the Webots version the PROTO will target (will adapt which nodes will be used).') args = parser.parse_args() diff --git a/urdf2webots/parserURDF.py b/urdf2webots/parserURDF.py index 9e4e144..9cc8235 100644 --- a/urdf2webots/parserURDF.py +++ b/urdf2webots/parserURDF.py @@ -17,7 +17,7 @@ # to pass from external robotName = '' -targetVersion = 'R2023b' +targetVersion = 'R2025a' class Inertia(): @@ -676,7 +676,7 @@ def getCollision(link, node, path, outputDirectory): collision.scale[2] = float(meshScale[2]) if (targetVersion >= 'R2023b' and collision.scale[0] != 1.0 and collision.scale[1] != 1.0 and collision.scale[2] != 1.0): - print('\033[1;33mWarning: BoundingObjects (collisions tags) cannot be scaled in version R2023b!' + print('\033[1;33mWarning: BoundingObjects (collisions tags) cannot be scaled in version R2023b and above!' ' Please create a separate model.\033[0m') if collision.scale[0] * collision.scale[1] * collision.scale[2] < 0.0: if extension in ['.dae', '.obj', '.stl']: diff --git a/urdf2webots/writeRobot.py b/urdf2webots/writeRobot.py index 9be4d96..fad1a28 100644 --- a/urdf2webots/writeRobot.py +++ b/urdf2webots/writeRobot.py @@ -13,7 +13,7 @@ linkToDef = False jointToDef = False indexSolid = 0 -targetVersion = 'R2023b' +targetVersion = 'R2025a' class RGB():