Using wheel encoders and IMU with robot_pose_ekf
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) :
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) :
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
Can you monitor /imu/data topic? There may be a constant drift in IMU.
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?
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?
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,
hi ! did you find any solution ? i get the same problem