Fix: Corrected compass calibration result report to match mavlink doc…#2035
Merged
vooon merged 2 commits intomavlink:ros2from Apr 30, 2025
Merged
Fix: Corrected compass calibration result report to match mavlink doc…#2035vooon merged 2 commits intomavlink:ros2from
vooon merged 2 commits intomavlink:ros2from
Conversation
…umentation (MAG_CAL_REPORT (192))
Member
|
Could you please apply ament_uncrustify from Jazzy or Rolling? |
Author
|
Good afternoon, I have completed everything. I have applied ament_uncrustify according to the standards from Rolling. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Improves parsing and publishing of MAG_CAL_REPORT (MAVLink message ID 192) in the
mag_calibrationplugin.This update aligns the
MagnetometerReporter.msgstructure with the official MAVLink documentation and ensures complete and accurate calibration report transmission via ROS 2 topic.Details
MagnetometerReporter.msgto include all fields defined in MAG_CAL_REPORT, such as:fitness(calibration quality metric)ofs_x,ofs_y,ofs_zdiag_x,diag_y,diag_zoffdiag_x,offdiag_y,offdiag_zorientation_confidence,old_orientation,new_orientationscale_factor,report,autosaved,cal_mask, etc.mag_calibration_status.cppto:MagnetometerReporterROS 2 message with all available data/mavros/mag_calibration/reportcontains accurate and complete information after compass calibration procedures.Testing
ros2 service call /mavros/cmd/commandwith:✅ Observed output on ROS 2 topic:
ros2 topic echo /mavros/mag_calibration/report📉 Before Fix (partial/incomplete output):
📈 After Fix (fully populated according to MAVLink spec)
Motivation
Without this fix, the /mavros/mag_calibration/report topic published incomplete messages lacking critical calibration feedback fields like fitness, offsets, or orientation metrics.
This caused limited visibility for developers and GCS tools using MAVROS in ROS 2 setups.
With this PR, the message now reflects the full MAVLink MAG_CAL_REPORT, improving integration and diagnostics.