Rosanswers logo

Hi all,

I have a mobile robot and I would like it to navigate around a room and I already have a map of the room. I am using rotary encoders for odometry. I am using robot_pose_ekf to merge data from rotary encoders and IMU. I am using amcl for localization and move_base for planning. Now the problem is, when I set the fixed frame in RVIZ as map, the status of IMU keeps on oscillating from Status:OK to following:

image description

The tf tree is shown which looks good to me: C:\fakepath\tf_tree.png

IMU part of the Code
For IMU, I am using http://wiki.ros.org/phidgets_imu and http://wiki.ros.org/imu_filter_madgwick.

<!-- IMU -->
<node pkg="phidgets_imu" type="phidgets_imu_node" name="IMU_node1" output="screen">
    <param name="frame_id" value="base_link"/>
<node pkg="imu_filter_madgwick" type="imu_filter_node" name="IMU_node2" output="screen">
    <param name="use_mag" value="false"/>
    <param name="publish_tf" value="false"/>
    <param name="fixed_frame" value="odom_combined"/>
    <remap from="/imu/data" to="/imu_data"/>    

I am not able to figure out why is this happening because frame id of IMU is base_link and transformation exists between it and the map as can be seen in the tf tree. Does anyone have any idea as to what might be causing this?

Thanks a lot.
Naman Kumar

Originally posted by Naman on ROS Answers with karma: 1464 on 2015-05-11

Post score: 0


1 Answer 1


Rosanswers logo

I think the reason why it flickers is that at the time the IMU message arrives, the TF that you're missing is not there yet most of the time. There's a race condition: when the TF with time stamp "t1" arrives before the IMU message with time stamp "t2", where t1 >= t2, it flickers to black, and otherwise to red.

The solution would be to fix the IMU RViz plugin: there should probably be a tf::waitForTransform() in there. But the problem is purely cosmetic; everything else should be working, right?

Originally posted by Martin Günther with karma: 11816 on 2015-05-13

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by Naman on 2015-05-13:
That makes sense. I changed the parameter period in the phidgets_imu from 8 ms to 32 ms and the issue got resolved. Yaa.. everything else seems to be working...Thanks!


Your Answer

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