@@ -60,7 +60,7 @@ def mkdirSafe(directory):
60
60
61
61
def convertUrdfFile (input = None , output = None , robotName = None , normal = False , boxCollision = False ,
62
62
toolSlot = None , initTranslation = '0 0 0' , initRotation = '0 0 1 0' ,
63
- initPos = None , linkToDef = False , jointToDef = False , relativePathPrefix = None , targetVersion = 'R2023b ' ):
63
+ initPos = None , linkToDef = False , jointToDef = False , relativePathPrefix = None , targetVersion = 'R2025a ' ):
64
64
"""Convert a URDF file into a Webots PROTO file or Robot node string."""
65
65
urdfContent = None
66
66
if not input :
@@ -95,7 +95,7 @@ def convertUrdfFile(input=None, output=None, robotName=None, normal=False, boxCo
95
95
96
96
def convertUrdfContent (input , output = None , robotName = None , normal = False , boxCollision = False ,
97
97
toolSlot = None , initTranslation = '0 0 0' , initRotation = '0 0 1 0' ,
98
- initPos = None , linkToDef = False , jointToDef = False , relativePathPrefix = None , targetVersion = 'R2023b ' ):
98
+ initPos = None , linkToDef = False , jointToDef = False , relativePathPrefix = None , targetVersion = 'R2025a ' ):
99
99
"""
100
100
Convert a URDF content string into a Webots PROTO file or Robot node string.
101
101
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
177
177
sys .stderr .write ('ROS not sourced, package "%s" will not be found.\n ' % packageName )
178
178
if os .path .split (directory )[1 ]:
179
179
packagePath = os .path .split (directory )[0 ]
180
- packagePath = packagePath .replace ("\\ " ,"/" )
180
+ packagePath = packagePath .replace ("\\ " , "/" )
181
181
input = input .replace ('package://' + packageName , packagePath + '/' + packageName )
182
182
else :
183
183
sys .stderr .write ('Can\' t determine package root path.\n ' )
@@ -326,8 +326,8 @@ def convertUrdfContent(input, output=None, robotName=None, normal=False, boxColl
326
326
parser .add_argument ('--relative-path-prefix' , dest = 'relativePathPrefix' , default = None ,
327
327
help = 'If set and --input not specified, relative paths in your URDF file will be treated relatively '
328
328
'to it rather than relatively to the current directory from which the script is called.' )
329
- parser .add_argument ('--target' , dest = 'targetVersion' , default = 'R2023b ' ,
330
- choices = ['R2023b' , 'R2023a' , 'R2022b' , 'R2022a' , 'R2021b' , 'R2021a' , 'R2020b' , 'R2020a' ],
329
+ parser .add_argument ('--target' , dest = 'targetVersion' , default = 'R2025a ' ,
330
+ choices = ['R2025a' , ' R2023b' , 'R2023a' , 'R2022b' , 'R2022a' , 'R2021b' , 'R2021a' , 'R2020b' , 'R2020a' ],
331
331
help = 'Sets the Webots version the PROTO will target (will adapt which nodes will be used).' )
332
332
333
333
args = parser .parse_args ()
0 commit comments