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

Airflow/Wind sensor #411

Open
wants to merge 4 commits into
base: gz-msgs9
Choose a base branch
from

Conversation

henrykotze
Copy link

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎉 New feature

Summary

This adds an airflow sensor. These sensors are generally used to measure wind and are ultrasonic devices, measuring the airflow speed and direction using the Doppler effect.

Here is some use cases of such sensors from a manufacturer sensor which we have used.
https://fttechnologies.com/case-studies.

This is part of a larger plan to support an airflow sensor in PX4. @dagar

Test it

Test are added to ensure correct use.

Some things to consider

There exist airflow/wind sensors which provides a 3D vector of the airflow its measuring. So I can see a later addition of adding more properties to the messages, however I have only experience with the 2D sensor, and these properties are the most relevant to them

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Do you mind to sign the commit ?

henrykotze added 3 commits November 29, 2023 14:50
Signed-off-by: henrykotze <henry@flycloudline.com>
Signed-off-by: henrykotze <henry@flycloudline.com>
Signed-off-by: henrykotze <henry@flycloudline.com>
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.57%. Comparing base (29cfe33) to head (db9a31f).
Report is 1 commits behind head on gz-msgs9.

Additional details and impacted files
@@            Coverage Diff            @@
##           gz-msgs9     #411   +/-   ##
=========================================
  Coverage     95.57%   95.57%           
=========================================
  Files            10       10           
  Lines          1062     1062           
=========================================
  Hits           1015     1015           
  Misses           47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

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

There's an anemometer sensor for Gazebo here:

https://github.com/srmainwaring/asv_sim
https://github.com/srmainwaring/asv_sim/blob/main/asv_sim_gazebo_plugins/src/GazeboRosAnemometer.cc

In this piece of code, the sensor publishes the wind velocity in the sensor frame (apparent wind) as a 3D vector.

I wonder if we could follow the same approach, as it will work for 2D (if you ignore z) and it doesn't require a new message.

What do you think?

@caguero
Copy link
Collaborator

caguero commented Jan 16, 2024

Friendly ping @henrykotze

@henrykotze
Copy link
Author

Will be looking into this soon. 👍 Thanks for the ping, I was on an extended holiday.

@henrykotze
Copy link
Author

@caguero Thanks for showing this to me.

I could definitely extend my code to account for the 3D vector, since the sensor would be more useful to other applications it seems. There does exist 3D airflow sensors (they are though much less than those of 2D, but it makes sense to account for future use-case)

I would also stick to my naming scheme since an anemometer measures the magnitude of a 2D wind velocity, so i think Airflow is a more applicable name for the sensor.

Let me know what you think and how I should proceed.

@henrykotze
Copy link
Author

From what I can see, each sensor has its own message, since they include the SensorNoise type in it. Also I think there exist the possibility that the message would be extended, since these airflow sensor provides more information about environment such as temperature and humidity.

Let me know how I should proceed

@caguero
Copy link
Collaborator

caguero commented Feb 3, 2024

I think a single 3D vector should capture your direction and speed (magnitude).

@henrykotze
Copy link
Author

👍 , so for clarity:
Add the 3d vector and use the standard vector3d message?

@caguero
Copy link
Collaborator

caguero commented Feb 6, 2024

👍 , so for clarity: Add the 3d vector and use the standard vector3d message?

👍

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
@azeey azeey removed the beta Targeting beta release of upcoming collection label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

5 participants