Base link oscillating between Encoder odom and filtered odom from robot localization package
Hello,
I made a differential drive mobile robot using move base and it used encoder ticks from wheel encoder to calculate odometry and i used this package link text
The robot faced localization problem due to wheel slippage so, To improve localization i fused odom from wheel encoder and imu data from realsense L515 USing ROBOT_-LOCALIZATION PACKAGE. after fusing it the filtured odom is not accurate and the tf of base_link is keep oscillating between encoder /diif/odom and the /odom from robot localization. Also i rotated the robot wheel by keeping the robot stationary as a result both the odom is rotating.
BELOW IS MY EKF YAML FILE
After going through the robot localization documentation completly, I tried every example in the configuring robot localization docs page link text no improvement.
frequency: 30
two_d_mode: true
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
# odom from the wheel encoders
odom0: /diff/odom
odom0_config: [false, false, false,
false, false, true,
true, true, false,
false, false, false,
false, false, false]
odom0_differential: true
#odom0_relative: true
imu0_remove_gravitational_acceleration: true
## IMU 0 data from the intel L515
imu0: /imu/dataa
imu0_config: [false, false, false,
false, false, true,
false, false, false,
false, false, false,
true, false, false]
#imu_linear_acceleration_rejection_threshold: 0.5
#imu_angular_velocity_rejection_threshold: 0.5
#imu0_relative: false
imu0_differential: false
MY SAMPLE ODOM DATA (/diff/odom) generated from wheel encoders. which works pretty good, static output when the robot is not moving and tested it with BOX TEST
header:
seq: 1991
stamp:
secs: 1683974534
nsecs: 421610116
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: -0.045909170121061965
y: 0.0009563543501025512
z: 0.0
orientation:
x: 0.0
y: 0.0
z: -0.009476805004755682
w: 0.9999550940751799
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
For the imu data i using a l515 realsense camera's imu. i ran the following cmd
roslaunch realsense2_camera rs_camera.launch enable_gyro:=true enable_accel:=true
which publishes accleration and gyro in two topic below is accleration data
header:
seq: 38099
stamp:
secs: 1683970284
nsecs: 140621662
frame_id: "camera_accel_optical_frame"
orientation:
x: 0.0
y: 0.0
z ...