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 #404

Open
wants to merge 8 commits into
base: gz-sensors7
Choose a base branch
from

Conversation

henrykotze
Copy link

@henrykotze henrykotze commented Nov 29, 2023

🎉 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.

Depends on:

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

The code is heavily based on the Airspeed Sensor

##Test it

Test are added to ensure correct use.
Checklist

Signed all commits for DCO
Added tests
Added example and/or tutorial
Updated documentation (as needed)
Updated migration guide (as needed)
Consider updating Python bindings (if the library has them)
codecheck passed (See contributing)
All tests passed (See test coverage)

While waiting for a review on your PR, please help review [another open pull request](https://github.com/pulls?q=is%3Aopen+is%3Apr+user%3Agazebosim+archived%3Afalse+) to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added the 🌱 garden Ignition Garden label Nov 29, 2023
- Still need to add resolution to measurement and add this to the sdf
format

Signed-off-by: henrykotze <[email protected]>
Signed-off-by: henrykotze <[email protected]>
Signed-off-by: henrykotze <[email protected]>
#ifndef GZ_SENSORS_AIRFLOWSENSOR_HH_
#define GZ_SENSORS_AIRFLOWSENSOR_HH_

#include <memory>
Copy link
Contributor

Choose a reason for hiding this comment

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

include chrono

#include <memory>

#include <sdf/sdf.hh>

Copy link
Contributor

Choose a reason for hiding this comment

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

include gz::math::Vector3d

* limitations under the License.
*
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

include map


#include <sdf/sdf.hh>

#include <gz/math/Helpers.hh>
Copy link
Contributor

Choose a reason for hiding this comment

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

include gz/math/pose.hh

* limitations under the License.
*
*/

Copy link
Contributor

Choose a reason for hiding this comment

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

include string, sstream


#include <memory>

#include <sdf/sdf.hh>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's avoid including sdf/sdf.hh since it includes all the headers available in libsdformat, which unnecessarily increases compile time.

Comment on lines +91 to +96
GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief Data pointer for private data
/// \internal
private: std::unique_ptr<AirFlowSensorPrivate> dataPtr;
GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use GZ_UTILS_IMPL_PTR instead? (see

GZ_UTILS_IMPL_PTR(dataPtr)
)


#include <gtest/gtest.h>

#include <sdf/sdf.hh>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use specific headers in sdf instead of sdf.hh.


/// \brief AirFlow Sensor Class
///
/// A sensor that reports air speed through differential pressure readings.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update this comment and add a good description of how this sensor works?

@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 review
Development

Successfully merging this pull request may close these issues.

3 participants