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

Multiple airspeed sensors in SITL with multi HIL_SENSOR instances #731

Merged
merged 4 commits into from
Mar 22, 2021

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Mar 20, 2021

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:

Testing
Tested single airspeed instances in SITL Gazebo with various models that use the airspeed sensor

Additional Context

@dagar FYI

Jaeyoung-Lim and others added 4 commits March 20, 2021 11:02
Abstracts sensor interface for the mavlink class
Add sensor msg mutex
This commit enables having multiple instances of HILdata instances in order to support multi-sensor setups for sensors that are included in the HIL_SENSOR mavlink message
This commit enables registering new sensor istances if the ids have never been seen before. This enables using non-sequential instance IDs
This commit sets the airspeed plugin into a sensor plugin. This allows the gazebo_mavlink_interface to automatically subscribes to the sensor topics
@Jaeyoung-Lim Jaeyoung-Lim merged commit 3e5fed0 into master Mar 22, 2021
@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-multi-airspeed branch March 22, 2021 18:34
RyosukeMatsushima pushed a commit to RyosukeMatsushima/PX4-SITL_gazebo that referenced this pull request Jun 21, 2022
…4#731)

* Add sensor interface

Abstracts sensor interface for the mavlink class
Add sensor msg mutex

* Enable multiple instances of HIL messages

This commit enables having multiple instances of HILdata instances in order to support multi-sensor setups for sensors that are included in the HIL_SENSOR mavlink message

* Register new HIL sensor instance if id has never been seen

This commit enables registering new sensor istances if the ids have never been seen before. This enables using non-sequential instance IDs

* Convert airspeed plugin into a sensor plugin

This commit sets the airspeed plugin into a sensor plugin. This allows the gazebo_mavlink_interface to automatically subscribes to the sensor topics
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