From 699e57b45deb802622a46c02e610cfeb66e8b546 Mon Sep 17 00:00:00 2001 From: Olivier Michel Date: Tue, 1 Sep 2020 12:18:17 +0200 Subject: [PATCH] Replace flat ElevationGrids with Planes --- .../robots/irobot/create/worlds/create.wbt | 9 ++--- .../neuronics/ipr/worlds/ipr_factory.wbt | 25 +++++-------- .../worlds/advanced_path_planning.wbt | 31 +++------------- .../environments/indoor/worlds/apartment.wbt | 35 ++++--------------- projects/samples/howto/worlds/biped.wbt | 15 ++------ .../howto/worlds/sick_terrain_scanning.wbt | 6 ++-- 6 files changed, 27 insertions(+), 94 deletions(-) diff --git a/projects/robots/irobot/create/worlds/create.wbt b/projects/robots/irobot/create/worlds/create.wbt index 97616ec7904..6edb32eedd2 100644 --- a/projects/robots/irobot/create/worlds/create.wbt +++ b/projects/robots/irobot/create/worlds/create.wbt @@ -102,7 +102,7 @@ DEF IROBOT_CREATE Create { Robot { children [ Transform { - translation -4.95 0 -4.95 + translation 0 0 0 children [ Shape { appearance Parquetry { @@ -110,11 +110,8 @@ Robot { scale 7 7 } } - geometry ElevationGrid { - xDimension 7 - xSpacing 1.65 - zDimension 7 - zSpacing 1.65 + geometry Plane { + size 10 10 } } ] diff --git a/projects/robots/neuronics/ipr/worlds/ipr_factory.wbt b/projects/robots/neuronics/ipr/worlds/ipr_factory.wbt index 1ab643e00f9..13ec9750712 100644 --- a/projects/robots/neuronics/ipr/worlds/ipr_factory.wbt +++ b/projects/robots/neuronics/ipr/worlds/ipr_factory.wbt @@ -44,33 +44,26 @@ DEF FLOOR Solid { DEF WALLS Solid { children [ Transform { - translation -10 4 -4 + translation -10 2 0 rotation 0 0 1 -1.57 children [ - Shape { - appearance DEF WALL_COLOR PBRAppearance { - baseColor 0.905882 0.72549 0.72549 - roughness 0.10196099999999997 + DEF WALL_SHAPE Shape { + appearance PBRAppearance { + baseColor 0.9 0.72 0.72 + roughness 0.1 metalness 0 } - geometry ElevationGrid { - xDimension 5 - zDimension 9 + geometry Plane { + size 4 8 } } ] } Transform { - translation 10 0 -4 + translation 10 2 0 rotation 0 0 1 1.57 children [ - Shape { - appearance USE WALL_COLOR - geometry ElevationGrid { - xDimension 5 - zDimension 9 - } - } + USE WALL_SHAPE ] } ] diff --git a/projects/samples/curriculum/worlds/advanced_path_planning.wbt b/projects/samples/curriculum/worlds/advanced_path_planning.wbt index 820a062ef29..f7d028a6961 100644 --- a/projects/samples/curriculum/worlds/advanced_path_planning.wbt +++ b/projects/samples/curriculum/worlds/advanced_path_planning.wbt @@ -11,21 +11,8 @@ TexturedBackground { } TexturedBackgroundLight { } -Transform { - translation 0.15 -0.0001 0.21 - children [ - Shape { - appearance PBRAppearance { - roughness 1 - metalness 0 - } - geometry Box { - size 0.5 0.0001 0.62 - } - } - ] -} DEF FLOOR Solid { + translation 0.15 0 0.205 children [ Shape { appearance PBRAppearance { @@ -33,22 +20,12 @@ DEF FLOOR Solid { roughness 1 metalness 0 } - geometry ElevationGrid { - xDimension 31 - xSpacing 0.01 - zDimension 43 - zSpacing 0.01 + geometry DEF FLOOR_PLANE Plane { + size 0.52 0.63 } } ] - boundingObject Transform { - translation 0.15 0 0.205 - children [ - Plane { - size 0.52 0.63 - } - ] - } + boundingObject USE FLOOR_PLANE } Shape { appearance PBRAppearance { diff --git a/projects/samples/environments/indoor/worlds/apartment.wbt b/projects/samples/environments/indoor/worlds/apartment.wbt index 90a30583e04..2e314e4f333 100644 --- a/projects/samples/environments/indoor/worlds/apartment.wbt +++ b/projects/samples/environments/indoor/worlds/apartment.wbt @@ -19,6 +19,7 @@ TexturedBackground { ] } DEF FLOOR Solid { + translation 3.3 0 4.95 children [ Shape { appearance Parquetry { @@ -26,27 +27,17 @@ DEF FLOOR Solid { scale 6 9 } } - geometry ElevationGrid { - xDimension 5 - xSpacing 1.65 - zDimension 7 - zSpacing 1.65 + geometry DEF FLOOR_PLANE Plane { + size 6.6 9.9 } } ] name "floor" - boundingObject Transform { - translation 3.3 0 4.96 - children [ - Plane { - size 6.6 9.9 - } - ] - } + boundingObject USE FLOOR_PLANE locked TRUE } DEF ROOF Solid { - translation 0 2.4 9.9 + translation 3.3 2.4 4.95 rotation 1 0 0 3.14159 children [ Shape { @@ -63,23 +54,11 @@ DEF ROOF Solid { scale 8 8 } } - geometry ElevationGrid { - xDimension 5 - xSpacing 1.65 - zDimension 7 - zSpacing 1.65 - } + geometry USE FLOOR_PLANE } ] name "roof" - boundingObject Transform { - translation 3.3 0 4.96 - children [ - Plane { - size 6.6 9.9 - } - ] - } + boundingObject USE FLOOR_PLANE locked TRUE } Wall { diff --git a/projects/samples/howto/worlds/biped.wbt b/projects/samples/howto/worlds/biped.wbt index 790ebc926b0..0dad542153b 100644 --- a/projects/samples/howto/worlds/biped.wbt +++ b/projects/samples/howto/worlds/biped.wbt @@ -15,7 +15,6 @@ TexturedBackground { TexturedBackgroundLight { } DEF FLOOR Solid { - translation -0.5 0 -0.5 children [ Shape { appearance PBRAppearance { @@ -23,21 +22,11 @@ DEF FLOOR Solid { roughness 1 metalness 0 } - geometry ElevationGrid { - xDimension 11 - xSpacing 0.1 - zDimension 11 - zSpacing 0.1 + geometry DEF PLANE Plane { } } ] - boundingObject Transform { - translation 0.5 0 0.5 - children [ - Plane { - } - ] - } + boundingObject USE PLANE } DEF BIPED Robot { translation 0.1 0.18 -0.2 diff --git a/projects/samples/howto/worlds/sick_terrain_scanning.wbt b/projects/samples/howto/worlds/sick_terrain_scanning.wbt index c449c0191bb..f98bd6a3b37 100644 --- a/projects/samples/howto/worlds/sick_terrain_scanning.wbt +++ b/projects/samples/howto/worlds/sick_terrain_scanning.wbt @@ -28,7 +28,6 @@ Robot { height 180 } Transform { - translation -50 0 -50 children [ Shape { appearance PBRAppearance { @@ -43,9 +42,8 @@ Robot { scale 3 3 } } - geometry ElevationGrid { - xDimension 100 - zDimension 100 + geometry Plane { + size 100 100 } } ]