ekf_localization_node : Wheel odometry and IMU filter output /odometry/filtered result worst than only wheel odometry
I'm trying to filter the IMU and Odometry for better odometry result with ROS Kinetic robot_localization ekf_localization_node. The result from topic /odometry/filtered looks even worst than the only wheel odometry result.
- The result of the odometry and the odometry/filtered result is shows below, the green line is the odometry/filtered result filter by ekf_localization_node, the blue line is the robot wheel encoder odometry. I control the robot go one round, and the odometry/filtered result drift a lot. How to configure it for a better odometry/filtered
2. The ekf_localization node give me this warning
[ WARN] [1559037541.564209301]: Transform from imu to base_link was unavailable for the time requested. Using latest instead.
These are my ekf_localization_node launch file, IMU topic, odometry topic and my ekf_localization configuration
ODOM TOPIC : /odom
header:
seq: 36880
stamp:
secs: 1559041171
nsecs: 825065674
frame_id: "odom"
child_frame_id: "base_link"
pose:
pose:
position:
x: -11.4829724863
y: 1.05053742504
z: 0.0
orientation:
x: -0.0
y: 0.0
z: 0.763262843766
w: -0.646088098735
covariance: [0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01]
twist:
twist:
linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0
covariance: [0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.01]
imu topic : /imu_data
header:
seq: 79151
stamp:
secs: 1559041431
nsecs: 174880504
frame_id: "imu"
orientation:
x: -0.0113399562479
y: 0.00536445058446
z: 0.525673082796
w: -0.850594167677
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
x: 1.11133271904e-83
y: 1.4868652577e-183
z: -1.13872042843e-82
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
x: -0.0335302734375
y: 0.24908203125
z: 9.87706054688
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Configuration
frequency: 30
sensor_timeout: 1
two_d_mode: true
transform_time_offset: 0.3
transform_timeout: 0.0
print_diagnostics: true
debug: false
debug_out_file: /path/to/debug/file.txt
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
odom0: /odom
odom0_config: [false, false, false,
false, false, false,
true, true, false,
false, false, true,
false, false, false]
odom0_queue_size: 2
odom0_nodelay ...
A couple things I notice off the bat (not sure any given one will fix your issue)
Your IMU message has no covariances, you need those.
If its not able to transform a static TF, you probably need to increase your robot state publisher by quite a bit until that goes away
stevemacenski Thank you for your reply, I'm not sure about how to calculate covariances for IMU, is that any hints for that?
Your spec sheet should contain the variances you are looking for
My IMU is JY901B, it does provided data sheet, but I didn't see any information related to covariances.