Skip to content

Commit

Permalink
Update default Webots target version (#203)
Browse files Browse the repository at this point in the history
* update version in master

* Update writeRobot.py
  • Loading branch information
ygoumaz authored May 22, 2023
1 parent e93139a commit c4cccd7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/expected/Human.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VRML_SIM R2022b utf8
#VRML_SIM R2023a 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
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/KukaLbrIiwa14R820.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VRML_SIM R2022b utf8
#VRML_SIM R2023a 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
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/MotomanSia20d.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VRML_SIM R2022b utf8
#VRML_SIM R2023a 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
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/RobotWithDummyLink.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VRML_SIM R2022b utf8
#VRML_SIM R2023a 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
Expand Down
2 changes: 1 addition & 1 deletion tests/expected/RobotWithLocalMeshes.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#VRML_SIM R2022b utf8
#VRML_SIM R2023a 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
Expand Down
6 changes: 3 additions & 3 deletions urdf2webots/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='R2022b'):
initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2023a'):
"""Convert a URDF file into a Webots PROTO file or Robot node string."""
urdfContent = None
if not input:
Expand Down Expand Up @@ -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='R2022b'):
initPos=None, linkToDef=False, jointToDef=False, relativePathPrefix=None, targetVersion='R2023a'):
"""
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.
Expand Down Expand Up @@ -325,7 +325,7 @@ 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='R2022b',
parser.add_argument('--target', dest='targetVersion', default='R2023a',
choices=['R2023a', 'R2022b', 'R2022a', 'R2021b', 'R2021a', 'R2020b', 'R2020a'],
help='Sets the Webots version the PROTO will target (will adapt which nodes will be used).')

Expand Down
2 changes: 1 addition & 1 deletion urdf2webots/writeRobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
linkToDef = False
jointToDef = False
indexSolid = 0
targetVersion = 'R2022b'
targetVersion = 'R2023a'


class RGB():
Expand Down

0 comments on commit c4cccd7

Please sign in to comment.