Skip to content

vrx_classic_changing_visual_params_tutorial

M1chaelM edited this page May 5, 2023 · 3 revisions

Changing Fog and Ambient Lighting

To produce more challenging visual conditions, we can change parameters for the fog and color of ambient light.

  • These are standard parameters associated with a scene element.
  • They can be specified simply by editing the appropriate xacro file for the world.

Examples

To alter the fog and ambient lighting in the Sydney Regatta world:

  • Open thevrx_gazebo/worlds/sydneyregatta.xacro file in an editor.
  • Add (or change) the fog and ambient tags within the definition.

For example, the scene block below adds fog to the environment:

    <scene>
      <sky>
        <clouds>
          <speed>12</speed>
        </clouds>
      </sky>
      <grid>0</grid>
      <origin_visual>0</origin_visual>
      <fog>
        <type> linear</type>
        <color> 0.7 0.7 0.7 1 </color>
        <density> 0.0 </density>
      </fog>
      <ambient> 1.0 1.0 1.0 1 </ambient>
    </scene>

Notes:

  • After editing the xacro file, you will need to rerun catkin_make from the root of your workspace for the changes to take effect.
  • See current version of the VRX Technical Guide for the envelope of values which used in the VRX challenge.
  • To alter the fog and ambient lighting in Sand Island world, edit vrx_2019/worlds/sandisland.xacro instead.

See also:

Clone this wiki locally