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

Changes to support HITL work with Gz Sim (Gazebo Harmonic) #649

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

haitomatic
Copy link

  • mavlink: enable support for gzsim HITL msg reception
  • sensor gps sim: remove white noise as there is complaint about GPS horizonal and vertical drift
  • rcS: enable px4 simulated sensors for HITL mode
  • add ssrc config for hitl eth gzsim

Tested on Saluki v3 (https://ssrc.atlassian.net/browse/DP-7621)

@@ -326,6 +326,13 @@ MavlinkReceiver::handle_message(mavlink_message_t *msg)
*
* Accept HIL GPS messages if use_hil_gps flag is true.
* This allows to provide fake gps measurements to the system.
*
* SSRC:
* in HIL mode, MAVLINK_MSG_ID_HIL_SENSOR only contains imu sensor data from
Copy link

Choose a reason for hiding this comment

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

The HIL_SENSOR message handles still also baro and mag, but is it just taken care by gazebo side sender that those fields will never be updated?

Copy link
Author

Choose a reason for hiding this comment

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

yes, currently in our models, there is only IMU plugin, hence only this https://github.com/tiiuae/px4-gzsim-plugins/blob/70a46b91baaf44de4a9f3160928e7f95a62e060b/src/mavlink_interface.cpp#L370C6-L370C12 got called and the sensor msg only contains updated IMU field. However, we can still keep the code as is in case of any future expansion as well as avoiding much deviation from upstream in case of HITL.

@haitomatic haitomatic merged commit 998af28 into main Mar 4, 2024
24 of 25 checks passed
@haitomatic haitomatic deleted the gzsim_hitl_PR branch March 5, 2024 13:38
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