Rosanswers logo

I have been trying to use the imu_filter_tools with my Arduino Pilot system. I linked the raw feed of the ardupilot to input of the imu_filter_madgwick package. I dont use the magnetometer data from the Ardupilot.

Here is the Launch file of the Imu filter settings

<node pkg="imu_filter_madgwick" type="imu_filter_node" name="imu_filter_node"> 
    <!-- Input data settings-->

    <remap from="imu/data_raw" to="/Imu" />
    <param name="use_mag" value="false"/>
    <param name="fixed_frame" value="/base_link"/>
    <param name="gain" value="0.1"/>

After this i try to visualize the orientation of the IMU system in Rviz. I set the fixed frame to be "/base_footprint" in Rviz.

After the IMU's Axis have converged on the stable value i move the IMU around and see the corresponding changes in the rviz.

Although the direction of changing in the display of rviz correspond to the actual changes in the IMU orientation, the axis do not.

Which means that if I rotate the Imu towards left the Rviz shows the same according to every Axis, be it X,Y or Z.

The specific problem is

1.The Z-axis points downwards. Which should face upwards. The acceleration vector which corresponds to the 'g' points upwards which again should be opposite.

2.According to the standards the Roll, Pitch and Yaw increase in the clockwise direction but in Rviz the filter outputs Yaw and Roll which increase in Anti-clockwise direction. The Yaw can be explained since the Z-axis points in the opposite direction but what about the Roll.?

How can i correct this problem of Inverted axis and inverted euler Angles.? Any help would be appreciated..


@tfoote I tried the thing that you suggested. What i did was to create another coordinate frame (/base_footprint).So the complete tree becomes /base_fooprint -> /base_link -> /IMU

I published the /tf between /base_footprint->/base_link to be (/base_footprint->/IMU)*(/base_link->/IMU).inverse().

The transform /base_footprint->/IMU was calculated by adding pi(3.14) to the Roll information of the /base_link->/IMU transform to invert Z-axis.

If there is a better solution please let me know.

Originally posted by Karan on ROS Answers with karma: 263 on 2013-05-04

Post score: 0


1 Answer 1


Rosanswers logo

You should create an additional coordinate frame as a child of base_link which is at the origin of the IMU and oriented the way the IMU is (aka upside down so that the z axis is alligned with the IMU readings. Then when rendered in base_link it will look correct.

Originally posted by tfoote with karma: 58457 on 2013-05-05

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

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