-
Notifications
You must be signed in to change notification settings - Fork 48
Configuring environment conditions
The MBZIRC simulation environments exposes a few parameters that allow users to configure and test with different environment conditions.
The magnitude of waves in the simulation environment can be changed to simulate different sea states. The default condition is sea state 1.
A convenient script is provided in the source code to help set various parameter for changing the sea state of the simulation environment. Two conditions are affected by changing the sea state:
- wave amplitudes
- wind magnitude
To change the sea state in your local simulation files:
-
Navigate to the
mbzirc/mbzirc_ign/scripts
directory and run theset_sea_state.sh
script:# set sea state to 2 ./set_sea_state.sh 2
The script updates the amplitudes of the waves and magnitude of wind in the local copy of the simulation world and model files.
-
You will then need to install the files for them to take effect:
colcon build --merge-install --cmake-clean-cache --packages-select mbzirc_ign
See the README.md file for instructions on building a colcon workspace.
-
To verify the changes, you can run the simple demo example. You should notice a few differences:
- The USV and the target vessel in the water will have slightly larger oscillating motion due to larger wave amplitude.
- The USV and the target vessel will also drift faster in X direction due to the increase in wind magnitude.
- The UAVs, when hovering, will also be affected by wind and drift in X direction.
An Ignition service is provided for triggering dust storms that cover the entire coast environment. The current model of the dust storm lasts for approximately a few minutes.
# launch the coast environment as usual
ros2 launch ros_ign_gazebo ign_gazebo.launch.py ign_args:="-v 4 -r coast.sdf"
# Invoke the Ignition service to start the dust storm
ign topic -t /model/dust_storm/link/link/particle_emitter/dust_storm/cmd -m ignition.msgs.ParticleEmitter -p 'emitting: {data: true}'
Note that the dust storm appears denser in the simulator's 3D window compared to the what is seen by a camera sensor, e.g. camera images published to ROS topics. This is mainly because the GUI camera (which provides the view displayed in the simulator's 3D window) has different settings than typical camera sensors.
Similar to dust storms, fog can also be triggered by invoking an Ignition service call.
# Invoke the Ignition service to start the fog
ign topic -t /model/fog/link/link/particle_emitter/fog/cmd -m ignition.msgs.ParticleEmitter -p 'emitting: {data: true}'