ambient_params_tutorial - osrf/vrx GitHub Wiki
- The color of ambient light can be set in the
scene
element of individual world files, found invrx_gz/worlds
. - The color is stored as a vector of RBG values between 0 and 1.
- In this tutorial we will use the
sydney_regatta
world as an example.
Open vrx/vrx_gz/worlds/sydney_regatta.sdf
and edit the RBG values specifying the color of ambient light:
<scene>
<sky></sky>
<grid>false</grid>
<ambient>1.0 1.0 1.0</ambient>
<background>0.8 0.8 0.8</background>
</scene>
For example, try changing all values to 0 to turn off ambient light: <ambient>0.0 0.0 0.0</ambient>
Be careful not to confuse the above parameter with the <ambient_light>
parameter, which is not currently used in VRX.
Recompile your workspace:
cd <VRX_WS>
colcon build --merge-install
Launch the simulation:
ros2 launch vrx_gz competition.launch.py world:=sydney_regatta
You should observe a sharpening of object shadows due to the absence of ambient light.
This screenshot shows the shadows of the trees with <ambient>1.0 1.0 1.0</ambient>
.
This screenshot shows the shadows of the trees with <ambient>0.0 0.0 0.0</ambient>
.
Back: Adjusting Fog Parameters | Top: VRX Tutorials |
---|