Multiple airspeed sensors in SITL with multi HIL_SENSOR instances #731
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem Description
This is a second try of #676
Previously, all sensor information that are passed in the mavlink message HIL_SENSOR were not able to simulate multiple instances of sensor data. Sensors included in the HIL_SENSOR message is airspeed sensor, imu, barometer, magnetometer.
This PR enables defining multiple HIL_SENSOR instances in SITL and as the first step support multiple airspeed sensor instances.
This can be useful for Airspeed fault detection can be tested with this PR. This has been discussed in the dev summit before: https://youtu.be/37BIBAzD6fE
Changes that were necessary to enable this change:
Added multi HIL_SENSOR support for the mavlink_interface. This is built on top of Introduce a sensor interface for mavlink HIL messages #671
Eigen::aligned_allocator
https://eigen.tuxfamily.org/dox/group__TopicStlContainers.htmlEIGEN_MAKE_ALIGNED_OPERATOR_NEW
to address https://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.htmlTesting
Tested single airspeed instances in SITL Gazebo with various models that use the airspeed sensor
Additional Context
@dagar FYI