Just to clarify - you are not converting your accelerometer / gyros / magnetometer measurements into an orientation, you are using those raw measurements to estimate your orientation. The madgwick and complementary filter are both capable of doing exactly what you need.
Originally posted by stevejp with karma: 929 on 2018-03-20
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by ahendrix on 2018-03-20:
The robot_localization package that the OP originally suggested can also do this.
Comment by stevejp on 2018-03-20:
@ahendrix I didn't think robot_localization dealt directly with magnetometer measurements. Can you explain how you would do this?
Comment by ahendrix on 2018-03-21:
I believe the navsat_transform_node can handle magnetometer measurements: http://docs.ros.org/lunar/api/robot_localization/html/navsat_transform_node.html
Comment by Robbe_C on 2018-03-21:
Thank you for the quick respone!
I think you are talking about the use_odometry_yaw parameter of navsat_transform_node, right?
Maybe that's even easier.
Comment by stevejp on 2018-03-21:
I don't think the navsat_transform_node is what you need. Navsat_transform is used to transform GPS measurements into odometry which you can fuse in robot_localization.