PX4-SITL_gazebo-classic icon indicating copy to clipboard operation
PX4-SITL_gazebo-classic copied to clipboard

Windsensor Model

Open henrykotze opened this issue 1 year ago • 4 comments

Windsensor model is based on FT Technologies FT742, which is a ultrasonic windsensor which provides accurate wind speed and wind direction measurements. This sensor is used in inspections.

The windsensor plugin is based on the airspeed sensor plugin and includes noise and resolution of the FT sensor.

The sensor can be added to any airframe model, similarly to that of GPS and airspeed sensor:

    <include>
      <uri>model://windsensor</uri>
      <pose>0 0 0 0 0 0</pose>
      <name>windsensor</name>
    </include>
    <joint name="windsensor_joint" type="fixed">
      <child>windsensor::link</child>
      <parent>base_link</parent>
    </joint>

We have amended the mavlink_hil_sensor message to include the wind sensor data, for allowing it to be sent to PX4, but here we have uncommented the section, until the the mavlink message defintition is updated. We are using it internally as such, but awaiting comments on how you would like to proceed in sending it to PX4.

henrykotze avatar Sep 10 '22 18:09 henrykotze

Yeah that is planned. I was just unsure whether PX4 will be happy with the way are sending it to the Autopilot, via the HIL_SENSOR. To clarify, so far we have only been using it in SITL, but we want to in HITL. Thus i dont know what is the impact of this change in HITL. I will make the PR for mavlink tomorrow if that is way we should proceed.

henrykotze avatar Sep 11 '22 12:09 henrykotze

Mavlink PR

henrykotze avatar Sep 12 '22 09:09 henrykotze

Changes:

  • I have renamed the windsensor plugin as an airflow sensor plugin which provides measurements about the airflow's speed and direction relative to the mounting of the sensor.
  • The sensor publishes a Airspeed.proto message which I have updated to include, speed and direction as optional fields.
  • In mavlink_interface, there is a check to determine whether the diff_pressure should be updated by evaluating whether it is not NAN. If it is NAN, then it is assumed is an airflow sensor which updates the speed and direction fields of the HIL type.
  • The airflow sensor messages is sent over mavlink using its own Mavlink message: HIL_AIRFLOW_SENSOR. New Mavlink PR

henrykotze avatar Sep 21 '22 14:09 henrykotze