fog_params_tutorial - osrf/vrx GitHub Wiki

Note: Fog Not Yet Implemented in Gazebo Sim

VRX fog relies on Gazebo Sim's implementation of the fog element described in the sdformat spec. This functionality was available in Gazebo classic, but has not yet been ported to Gazebo Garden. Please note that until this port is complete, the steps outlined in the tutorial below will not produce a fog effect.

Adjusting Fog Parameters

  • Fog can be specified as an element of <scene>. See the sdformat spec for details.

Steps

Step 1: Modify Parameters

Open vrx/vrx_gz/worlds/sydney_regatta.sdf and add fog to the scene:

    <scene>
      <sky></sky>
      <grid>false</grid>
      <ambient>1.0 1.0 1.0</ambient>
      <background>0.8 0.8 0.8</background>
      <fog>
        <type>linear</type>
        <color>1 1 1 1</color>
        <start>1</start>
        <end>100</end>
        <density>1</density>
      </fog>

    </scene>

Step 2: Rebuild

Recompile your workspace:

cd <VRX_WS>
colcon build --merge-install

Step 3: Test

Launch the simulation:

ros2 launch vrx_gz competition.launch.py world:=sydney_regatta

The scene should now have fog.

Back: Adjusting Wave Parameters Top: VRX Tutorials Next: Adjusting Ambient Light
⚠️ **GitHub.com Fallback** ⚠️