Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windsensor Model #909

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

henrykotze
Copy link

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.

Henry Kotze added 5 commits September 9, 2022 22:15
- Wind Sensor added which outputs wind direction and wind speed
- Since the wind sensor is mounted ontop of the aircraft it measures the
combined affect of wind and the velocity of the aircraft.
- PX4 received the measurements produced by the Sensor Model
- Windsensor bitmask in HIL_SENSOR message corrected
@dagar dagar requested review from Jaeyoung-Lim and dagar September 10, 2022 20:21
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henrykotze Thanks for the nice contribution!

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.

Before I go through the PR, I don't see any PR related to the extension of the HIL messages in mavlink. Was this planned?

@henrykotze
Copy link
Author

henrykotze commented Sep 11, 2022

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
Copy link
Author

Mavlink PR

CMakeLists.txt Outdated Show resolved Hide resolved
@henrykotze
Copy link
Author

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

@Jaeyoung-Lim
Copy link
Member

@henrykotze Any updates regarding the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants