Using wheel encoders and IMU with robot_pose_ekf

asked 2015-10-26 13:21:42 -0600

Naman gravatar image

updated 2015-10-27 11:03:30 -0600

Hi all,

I am using wheel_encoders to get the odometry data and then I am fusing it with IMU data using robot_pose_ekf to get the combined odometry. When I use only wheel encoders, everything works perfectly and the odometry data overlays with the actual motion of the robot (red arrow shows the odom from wheel encoders) :

image description

But when I use both wheel_encoders and IMU using robot_pose_ekf, the odometry data from the wheel encoders does not align with the actual motion of the robot (red arrow shows the odom from wheel encoders) :

image description

See the complete video here: https://youtu.be/pzbXBuUn6Eo

As you can see, odom from wheel encoders is completely off and I am not able to figure out why and it only happens when I add IMU to the robot_pose_ekf. Does anyone know why is this happening and is it normal? If not, what can be the problem? Let me know if you need more information from my side.

Update:

I am using phidgets 3/3/3 IMU and using http://wiki.ros.org/phidgets_imu and http://wiki.ros.org/imu_filter_madgwick to get the orientation of the robot (or IMU). Code (from a launch file):

<node pkg="phidgets_imu" type="phidgets_imu_node" name="IMU_node1" output="screen">
    <param name="frame_id" value="base_link"/>
    <param name="period" value="32"/>
</node>
<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"/>
    <param name="orientation_stddev" value="0.1"/>
    <remap from="/imu/data" to="/imu_data"/>    
</node>

and Yes, angle increases when the robot turns left.

I am not using the magnetometer of the IMU and for a physical 90 degree increase, IMU shows approximately 90 degree (+- 2 degrees) increase. And for the odom, covariance value is 0.00001 for x,y,yaw,vx,vy and vyaw and very large values for others. For IMU, the orientation covariance is 0, Can this be a problem? I have asked how to specify covariance for IMU orientaion in another question.

Thanks in advance.
Naman Kumar

edit retag flag offensive close merge delete

Comments

Can you monitor /imu/data topic? There may be a constant drift in IMU.

Akif gravatar image Akif  ( 2015-10-26 14:42:05 -0600 )edit

My IMU doesn't do this. Can you please add information about the IMU you use? Also, when your bot does a left turn, does the angle on the IMU increase or decrease?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-26 15:07:55 -0600 )edit

ok the board comes from magnetometer, have you checked the calibration? e.g. 90° increase in angle value for physical 90° rotation. And how did you set the covariances for imu and odom?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-27 07:10:47 -0600 )edit

I have no idea what happens if covariance is zero, but it definitely sounds like a bad idea to use a kalman filter with that,

Humpelstilzchen gravatar image Humpelstilzchen  ( 2015-10-29 01:29:25 -0600 )edit

hi ! did you find any solution ? i get the same problem

kesuke gravatar image kesuke  ( 2018-07-25 16:29:08 -0600 )edit