ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Problem with coordinate axis of rviz_imu_plugin

asked 2013-05-04 01:19:56 -0600

Karan gravatar image

updated 2013-05-05 22:51:30 -0600

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"/>
</node>

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..

--EDIT--

@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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-05-05 07:53:02 -0600

tfoote gravatar image

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-04 01:19:56 -0600

Seen: 1,700 times

Last updated: May 05 '13