From a41bbd906d8e326eb015ae8a84c3da0ece163a43 Mon Sep 17 00:00:00 2001 From: fherrero <fherrero@iri.upc.edu> Date: Thu, 12 Dec 2019 10:46:32 +0100 Subject: [PATCH] Add ambient to dae textures. Add rotated sun to gazebo worlds --- meshes/brl.dae | 12 ++++++------ meshes/brl_text.dae | 12 ++++++------ meshes/fme_door_open.dae | 2 +- meshes/ramps.dae | 2 +- meshes/willow.dae | 8 ++++---- worlds/brl.world | 16 ++++++++++++++++ worlds/brl_text.world | 16 ++++++++++++++++ worlds/empty.world | 18 +++++++++++++++++- worlds/fme_door_open.world | 16 ++++++++++++++++ worlds/ramps.world | 16 ++++++++++++++++ worlds/rooms.world | 2 +- worlds/willow.world | 16 ++++++++++++++++ 12 files changed, 116 insertions(+), 20 deletions(-) diff --git a/meshes/brl.dae b/meshes/brl.dae index 139fdd1..a8119e0 100644 --- a/meshes/brl.dae +++ b/meshes/brl.dae @@ -176,7 +176,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.64 0.64 1</color> @@ -202,7 +202,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.64 0.64 1</color> @@ -228,7 +228,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.64 0.64 1</color> @@ -254,7 +254,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.2248073 0.2248073 0.2248073 1</color> @@ -280,7 +280,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.05074915 0.06841572 0.09896782 1</color> @@ -306,7 +306,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.07267014 0.07267014 0.07267014 1</color> diff --git a/meshes/brl_text.dae b/meshes/brl_text.dae index f095ba6..90ec545 100644 --- a/meshes/brl_text.dae +++ b/meshes/brl_text.dae @@ -115,7 +115,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.2248073 0.2248073 0.2248073 1</color> @@ -141,7 +141,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.05074915 0.06841572 0.09896782 1</color> @@ -167,7 +167,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.07267014 0.07267014 0.07267014 1</color> @@ -203,7 +203,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <texture texture="bricks_jpg_002-sampler"/> @@ -239,7 +239,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <texture texture="grey_tile_jpg_002-sampler"/> @@ -275,7 +275,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <texture texture="bricks_jpg_002-sampler"/> diff --git a/meshes/fme_door_open.dae b/meshes/fme_door_open.dae index d50132c..85d88a8 100644 --- a/meshes/fme_door_open.dae +++ b/meshes/fme_door_open.dae @@ -459,7 +459,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.64 0.64 1</color> diff --git a/meshes/ramps.dae b/meshes/ramps.dae index 83e2776..8880a9e 100644 --- a/meshes/ramps.dae +++ b/meshes/ramps.dae @@ -115,7 +115,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.6264319 0.5867408 1</color> diff --git a/meshes/willow.dae b/meshes/willow.dae index 61e1e7c..1b1893d 100644 --- a/meshes/willow.dae +++ b/meshes/willow.dae @@ -285,7 +285,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.3457769 0.3457769 1</color> @@ -311,7 +311,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.64 0.587768 0.3296951 1</color> @@ -337,7 +337,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.3598191 0.4211674 0.64 1</color> @@ -363,7 +363,7 @@ <color sid="emission">0 0 0 1</color> </emission> <ambient> - <color sid="ambient">0 0 0 1</color> + <color sid="ambient">0.3 0.3 0.3 1</color> </ambient> <diffuse> <color sid="diffuse">0.3161188 0.64 0.2839875 1</color> diff --git a/worlds/brl.world b/worlds/brl.world index 15d54fa..46e49ab 100644 --- a/worlds/brl.world +++ b/worlds/brl.world @@ -1,10 +1,26 @@ <?xml version="1.0" ?> <sdf version="1.4"> <world name="brl"> + <!-- <include> <uri>model://sun</uri> </include> + --> + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> + <!-- <include> <uri>model://ground_plane</uri> diff --git a/worlds/brl_text.world b/worlds/brl_text.world index dedf925..f8fd193 100644 --- a/worlds/brl_text.world +++ b/worlds/brl_text.world @@ -1,9 +1,25 @@ <?xml version="1.0" ?> <sdf version="1.4"> <world name="brl_text"> + <!-- <include> <uri>model://sun</uri> </include> + --> + + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> <!-- <include> diff --git a/worlds/empty.world b/worlds/empty.world index 38d19b4..a7a7abe 100644 --- a/worlds/empty.world +++ b/worlds/empty.world @@ -1,10 +1,26 @@ <?xml version="1.0" ?> <sdf version="1.5"> <world name="default"> - <!-- A global light source --> + <!-- <include> <uri>model://sun</uri> </include> + --> + + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> + <!-- A ground plane --> <include> <uri>model://ground_plane</uri> diff --git a/worlds/fme_door_open.world b/worlds/fme_door_open.world index 884a07a..342ca15 100644 --- a/worlds/fme_door_open.world +++ b/worlds/fme_door_open.world @@ -1,9 +1,25 @@ <?xml version="1.0" ?> <sdf version="1.4"> <world name="fme_door_open"> + <!-- <include> <uri>model://sun</uri> </include> + --> + + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> <include> <uri>model://ground_plane</uri> diff --git a/worlds/ramps.world b/worlds/ramps.world index c7a5cc4..ca0f65b 100644 --- a/worlds/ramps.world +++ b/worlds/ramps.world @@ -1,9 +1,25 @@ <?xml version="1.0" ?> <sdf version="1.4"> <world name="ramps"> + <!-- <include> <uri>model://sun</uri> </include> + --> + + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> <!-- <include> diff --git a/worlds/rooms.world b/worlds/rooms.world index fd33c5b..f31693d 100644 --- a/worlds/rooms.world +++ b/worlds/rooms.world @@ -2,7 +2,7 @@ <world name='default'> <light name='sun' type='directional'> <cast_shadows>1</cast_shadows> - <pose frame=''>0 0 10 0 -0 0</pose> + <pose frame=''>0 0 10 0.2 0.2 0.2</pose> <diffuse>0.8 0.8 0.8 1</diffuse> <specular>0.1 0.1 0.1 1</specular> <attenuation> diff --git a/worlds/willow.world b/worlds/willow.world index bcf434f..0b1b585 100644 --- a/worlds/willow.world +++ b/worlds/willow.world @@ -1,9 +1,25 @@ <?xml version="1.0" ?> <sdf version="1.4"> <world name="willow"> + <!-- <include> <uri>model://sun</uri> </include> + --> + + <light type="directional" name="sun"> + <cast_shadows>true</cast_shadows> + <pose>0 0 10 0.2 0.2 0.2</pose> + <diffuse>0.8 0.8 0.8 1</diffuse> + <specular>0.2 0.2 0.2 1</specular> + <attenuation> + <range>1000</range> + <constant>0.9</constant> + <linear>0.01</linear> + <quadratic>0.001</quadratic> + </attenuation> + <direction>-0.5 0.1 -0.9</direction> + </light> <include> <uri>model://ground_plane</uri> -- GitLab