-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabling Global Illumination (GI VCT) for sensors in SDF (#2550)
Signed-off-by: Athena Z <[email protected]> Co-authored-by: Ian Chen <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
- Loading branch information
1 parent
e237d59
commit a167312
Showing
11 changed files
with
1,671 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,328 @@ | ||
<?xml version="1.0" ?> | ||
<!-- | ||
A demo showcasing global illumination (using VCT method) enabled for the camera sensor view. | ||
--> | ||
<sdf version="1.10"> | ||
<world name="gi_demo"> | ||
<!--sensor plugins--> | ||
<plugin | ||
filename="gz-sim-physics-system" | ||
name="gz::sim::systems::Physics"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-sensors-system" | ||
name="gz::sim::systems::Sensors"> | ||
<render_engine>ogre2</render_engine> | ||
<global_illumination type="vct"> | ||
<enabled>true</enabled> | ||
<resolution>16 16 16</resolution> | ||
<octant_count>1 1 1</octant_count> | ||
<bounce_count>6</bounce_count> | ||
<high_quality>true</high_quality> | ||
<anisotropic>true</anisotropic> | ||
<thin_wall_counter>1.0</thin_wall_counter> | ||
<conserve_memory>false</conserve_memory> | ||
<debug_vis_mode>none</debug_vis_mode> | ||
</global_illumination> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-user-commands-system" | ||
name="gz::sim::systems::UserCommands"> | ||
</plugin> | ||
<plugin | ||
filename="gz-sim-scene-broadcaster-system" | ||
name="gz::sim::systems::SceneBroadcaster"> | ||
</plugin> | ||
|
||
<!--scene description for system view--> | ||
<scene> | ||
<ambient>0.1 0.1 0.1</ambient> | ||
<background>0 0 0</background> | ||
</scene> | ||
|
||
<!--GUI plugins--> | ||
<gui> | ||
<plugin filename="MinimalScene" name="3D View"> | ||
<gz-gui> | ||
<title>Cornell box GI demo</title> | ||
<property type="bool" key="showTitleBar">true</property> | ||
<property type="string" key="state">docked</property> | ||
</gz-gui> | ||
<engine>ogre2</engine> | ||
<camera_pose>-12 0 4 0 0 0</camera_pose> | ||
</plugin> | ||
|
||
<plugin filename="ImageDisplay" name="Image Display"> | ||
<topic>camera</topic> | ||
</plugin> | ||
|
||
<!-- <plugin filename="GlobalIlluminationVct" name="Global Illumination Vct"> | ||
</plugin> --> | ||
|
||
<plugin filename="GzSceneManager" name="Scene Manager"> | ||
<gz-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</gz-gui> | ||
</plugin> | ||
|
||
<plugin filename="InteractiveViewControl" name="Interactive view control"> | ||
<gz-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</gz-gui> | ||
</plugin> | ||
|
||
<plugin filename="TransformControl" name="Transform control"> | ||
<gz-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="x" type="double">0</property> | ||
<property key="y" type="double">50</property> | ||
<property key="width" type="double">250</property> | ||
<property key="height" type="double">50</property> | ||
<property key="state" type="string">docked</property> | ||
<property key="showTitleBar" type="bool">true</property> | ||
<property key="cardBackground" type="string">#777777</property> | ||
</gz-gui> | ||
</plugin> | ||
<plugin filename="SelectEntities" name="Select Entities"> | ||
<gz-gui> | ||
<property key="resizable" type="bool">false</property> | ||
<property key="width" type="double">5</property> | ||
<property key="height" type="double">5</property> | ||
<property key="state" type="string">floating</property> | ||
<property key="showTitleBar" type="bool">false</property> | ||
</gz-gui> | ||
</plugin> | ||
</gui> | ||
|
||
<!--lighting--> | ||
<light type="point" name="ceiling_light"> | ||
<pose>0 0 7.5 0 0 0</pose> | ||
<diffuse>1 1 1 1</diffuse> | ||
<specular>0.0 0.0 0.0 0</specular> | ||
<attenuation> | ||
<range>50</range> | ||
<linear>0</linear> | ||
<constant>0</constant> | ||
<quadratic>0.02</quadratic> | ||
</attenuation> | ||
<cast_shadows>true</cast_shadows> | ||
<visualize>false</visualize> | ||
<intensity>1.0</intensity> | ||
</light> | ||
|
||
<!--wall models--> | ||
<model name="wall_left"> | ||
<pose>0 5 4 0 0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>10 1 10</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>10 1 10</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>1 0 0 1</ambient> | ||
<diffuse>1 0 0 1</diffuse> | ||
<specular>1 0 0 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<model name="wall_right"> | ||
<pose>0 -5 4 0 0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>10 1 10</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>10 1 10</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>0 1 0 1</ambient> | ||
<diffuse>0 1 0 1</diffuse> | ||
<specular>0 1 0 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<model name="floor"> | ||
<pose>0 0 -0.5 0 0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>10 10 1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>10 10 1</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<model name="ceiling"> | ||
<pose>0 0 8.5 0 0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>10 10 1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>10 10 1</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<model name="wall_back"> | ||
<pose>4.5 0 4 0 0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>1 10 10</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>1 10 10</size> | ||
</box> | ||
</geometry> | ||
<material> | ||
<ambient>0.8 0.8 0.8 1</ambient> | ||
<diffuse>0.8 0.8 0.8 1</diffuse> | ||
<specular>0.8 0.8 0.8 1</specular> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<!--scene objects--> | ||
<model name="pump"> | ||
<pose>-1.5 0 0 0 0 0</pose> | ||
<link name="pump_link"> | ||
<collision name="pump_collision"> | ||
<geometry> | ||
<mesh> | ||
<uri>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/meshes/pump.dae</uri> | ||
<scale>3 3 3</scale> | ||
</mesh> | ||
</geometry> | ||
</collision> | ||
|
||
<visual name="pump_visual"> | ||
<geometry> | ||
<mesh> | ||
<uri>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/meshes/pump.dae</uri> | ||
<scale>3 3 3</scale> | ||
</mesh> | ||
</geometry> | ||
<material> | ||
<diffuse>1.0 1.0 1.0</diffuse> | ||
<specular>1.0 1.0 1.0</specular> | ||
<pbr> | ||
<metal> | ||
<albedo_map>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/materials/textures/pump_albedo.png</albedo_map> | ||
<roughness_map>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/materials/textures/pump_roughness.png</roughness_map> | ||
<metalness_map>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/materials/textures/pump_metallic.png</metalness_map> | ||
<normal_map>https://fuel.gazebosim.org/1.0/openrobotics/models/pump/1/files/materials/textures/pump_normal.png</normal_map> | ||
</metal> | ||
</pbr> | ||
</material> | ||
</visual> | ||
</link> | ||
</model> | ||
|
||
<!--camera sensor--> | ||
<model name="camera"> | ||
<pose>-15 0 4 0 0.0 0</pose> | ||
<static>true</static> | ||
<link name="link"> | ||
<pose>0.05 0.05 0.05 0 0 0</pose> | ||
<collision name="collision"> | ||
<geometry> | ||
<box> | ||
<size>0.1 0.1 0.1</size> | ||
</box> | ||
</geometry> | ||
</collision> | ||
<visual name="visual"> | ||
<geometry> | ||
<box> | ||
<size>0.1 0.1 0.1</size> | ||
</box> | ||
</geometry> | ||
</visual> | ||
<sensor name="camera" type="camera"> | ||
<camera> | ||
<horizontal_fov>1.047</horizontal_fov> | ||
<image> | ||
<width>2560</width> | ||
<height>1920</height> | ||
</image> | ||
<clip> | ||
<near>0.1</near> | ||
<far>100</far> | ||
</clip> | ||
</camera> | ||
<always_on>1</always_on> | ||
<update_rate>30</update_rate> | ||
<visualize>true</visualize> | ||
<topic>camera</topic> | ||
</sensor> | ||
</link> | ||
</model> | ||
</world> | ||
</sdf> |
Oops, something went wrong.