odometry/filters starts drifting a lot, how to fix it?
hi everyone,
the odometry/filters starts drifting a lot, i am using the following file, how can i decrease it?
warthog_joint_publisher:
type: "joint_state_controller/JointStateController"
publish_rate: 50
warthog_velocity_controller:
type: "diff_drive_controller/DiffDriveController"
left_wheel: ['front_left_wheel_joint', 'rear_left_wheel_joint']
right_wheel: ['front_right_wheel_joint', 'rear_right_wheel_joint']
publish_rate: 50
pose_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 0.03]
twist_covariance_diagonal: [0.001, 0.001, 0.001, 1000000.0, 1000000.0, 0.03]
cmd_vel_timeout: 0.25
# Odometry fused with IMU is published by robot_localization, so
# no need to publish a TF based on encoders alone.
enable_odom_tf: false
# Wheel separation and radius multipliers
wheel_separation: 1.08 # Auto read will fail due to suspension link
wheel_separation_multiplier: 1.0 # default: 1.0
wheel_radius_multiplier : 1.0 # default: 1.0
# Velocity and acceleration limits
# Whenever a min_* is unspecified, default to -max_*
linear:
x:
has_velocity_limits : true
max_velocity : 5.0 # m/s
has_acceleration_limits: true
max_acceleration : 20.0 # m/s^2
angular:
z:
has_velocity_limits : true
max_velocity : 4.0 # rad/s
has_acceleration_limits: true
max_acceleration : 20.0 # rad/s^2
ekf_localization:
frequency: 50
two_d_mode: true
odom0: /warthog_velocity_controller/odom
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, true,
false, false, false]
odom0_differential: false
imu0: /gx5/imu/data
imu0_config: [false, false, false,
false, false, false,
false, false, false,
false, false, true,
true, true, false]
imu0_differential: false
odom_frame: odom
base_link_frame: base_link
world_frame: odom
two_d_mode: true
after modifying the matrices:
seq: 4588
stamp:
secs: 1643283813
nsecs: 468730450
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: 0.050336928747
y: 0.00634622035396
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.128117776541
w: 0.991758960299
covariance: [108004.85516289844, -585916.9443093863, 0.0, 0.0, 0.0, -0.13113662749975435, -585916.9443093836, 3195357.383071448, 0.0, 0.0, 0.0, 0.7789360876951698, 0.0, 0.0, 4.996529035234899e-07, -6.190104952331789e-22, -1.4853369544840475e-17, 0.0, 0.0, 0.0, -6.190104952331788e-22, 4.993067684356823e-07, -2.648985345882294e-29, 0.0, 0.0, 0.0, -1.485336954484047e-17, -2.648902855234479e-29, 4.993067684356823e-07, 0.0, -0.13113662749975516, 0.7789360876951649, 0.0, 0.0, 0.0, 5.548461022681045]
twist:
twist:
linear:
x: 0.00294294795962
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.00349156370239
covariance: [0.0012169734244174603, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2603.2137443508523, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.994797161274615e-07, -3.806581089190225e-31, -9.048180481660797e-27, 0.0, 0.0, 0.0, -3.806581089190226e-31, 4.979317389049878e-07, -6.392718743071225e-38, 0.0, 0.0, 0.0, -9.04818048166079e-27, -6.392440735414209e-38, 4.979317389049878e-07, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001601166305818822]
thanks
@Delbina Did you end up solving your issue or are you still having problems?
I have put false the angular velocity from the wheel odometer. it seems not bad. i have accepted the answer, and if there was any other issue, I will ask here.
thanks a lot