The existing SITL-JSON schema includes a windVane element that expects the apparent wind speed and direction.
The direction is the angle radians from the forward direction using the FRD frame convention. Angles should be in the range [-PI, PI]. The speed is measured in m/s.
windVane {
direction: 0.0,
speed: 0.0
}
Populating windVane data is enabled by including an <anemometer> element in the plugin definition. The element should contain the scoped name of an anemometer sensor. For example:
The anemometer is a third party Gazebo custom sensor. The only requirement for the ArduPilot plugin is that the sensor publishes a msg::Vector3d to the sensor topic:
loads the system from the library asv_sim. Other implementations of an anemometer sensor may be loaded by substituting the corresponding library name and alias.
Testing
Ensure tests/worlds is added to GZ_SIM_RESOURCE_PATH
Add support for an anemometer sensor.
Details
The existing SITL-JSON schema includes a
windVane
element that expects the apparent wind speed and direction.The direction is the angle radians from the forward direction using the FRD frame convention. Angles should be in the range [-PI, PI]. The speed is measured in m/s.
Populating
windVane
data is enabled by including an<anemometer>
element in the plugin definition. The element should contain the scoped name of an anemometer sensor. For example:where the link is specified as:
The anemometer is a third party Gazebo custom sensor. The only requirement for the ArduPilot plugin is that the sensor publishes a
msg::Vector3d
to the sensor topic:The sensor system is enabled by including a system plugin associated with the
<world>
element. For example:loads the system from the library
asv_sim
. Other implementations of an anemometer sensor may be loaded by substituting the corresponding library name and alias.Testing
Ensure tests/worlds is added to GZ_SIM_RESOURCE_PATH
Gazebo
SITL
Figure: anemometer pointing north.
Figure: anemometer pointing east.
Figure: anemometer pointing south.
Figure: anemometer pointing west.