0
$\begingroup$

Rosanswers logo

Hello

I'm trying to fuse my IMU data (and GPS data) with the package robot_localization. Therefore, I have to put my IMU data into a sensor_msgs/Imu message. I know it is possible to convert my IMU data (accelerometer, gyroscope and magnetometer) into a quaternion orientation message. However, I wonder if there is a package available to do this transformation for me, or do I have to write code myself? If so, how would I start?

Thanks in advance! Kind regards Robbe


Originally posted by Robbe_C on ROS Answers with karma: 23 on 2018-03-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.