Add option to publish heading as IMU message #186
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.
As this came back up for me I'm opening a pull request. It is based on #132, but without obsolete parts.
This PR enhances the driver by adding the option to publish the heading as a sensor_msgs/Imu message in ROS 2.
Changes
Introduced a new parameter:
publishIMU (bool, default: false) – enables or disables publishing of IMU messages.
Added functionality to publish an Imu message on heading/imu containing heading data when publishIMU is set to true.
Maintains existing behavior when the parameter is not enabled (no breaking changes).
Motivation
Certain applications require heading information to be available in the standard sensor_msgs/Imu format (e.g. robot_localization), allowing for easier integration with downstream components that already subscribe to IMU topics. This change provides that option without affecting users who only need the original GPS data.
Testing
Notes
The IMU message currently includes heading information derived from the NMEA data. Other IMU fields (e.g., linear acceleration, angular velocity) remain unset, just like the covariance matrix.
additional testing with further devices is very welcome!