ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Odom_filtered did not change much when using robot_localization

asked 2023-02-19 19:56:11 -0600

AutoCar gravatar image

updated 2023-02-20 02:49:49 -0600

ljaniec gravatar image

Hi, My robot has a VESC which drives the motor and servo. The published odom is calculated based on the command sent to VESC. So basically, the odom is calculated on expected robot movements. If I take two consecutive odom frames and look at the movement, the distance is close to what it actually moved but the orientation change is far away from the true orientation change.

I tried to use robot_localization to fuse odom and IMU to get a better odom_filtered. However, after I tested the results, I found odom and odom_filtered were very similar and there was not much changes between the two.

What parameter should I change to make the odom_filter better? Below is my parameters:

frequency: 100
two_d_mode: true
publish_tf: true

map_frame: map # Defaults to "map" if unspecified
odom_frame: odom # Defaults to "odom" if unspecified
base_link_frame: base_link # Defaults to "base_link" if unspecified
world_frame: odom # Defaults to the value of odom_frame if unspecified

odom0: /odom
odom0_config: [true, true, false,
false, false, true,
true, true, false,
false, false, true,
false, false, false]
odom0_differential: false

imu0: /imu/data
imu0_config: [false, false, false,
true, true, true,
false, false, false,
false, false, true,
true, false, false]
imu0_differential: false

process_noise_covariance: [0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0.06, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0.025, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.04, 0, 0, 0, 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, 0, 0, 0.01, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02, 0, 0, 0,
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, 0, 0, 0.01, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.015]

initial_estimate_covariance: [1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1e-9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-20 15:54:07 -0600

chased11 gravatar image

I would look at the covariance matrices that are used by the EKF. If one source is reporting a very low covariance value and one is higher, then that could be what's causing this.

edit flag offensive delete link more

Comments

THank you for replying. But I am not sure what you mean. What are the sources of covariance values?

AutoCar gravatar image AutoCar  ( 2023-02-20 21:41:22 -0600 )edit

The data that is being published to imu/data and /odom have a corresponding covariance matrix published as part of the message. Edit your answer with a full message that is being published from your imu and odometry source and it might help make sense of it (rostopic echo [topic i.e. imu/data].

The wiki explains it more but the covariance matrix tells the EKF the expected 'reliability' of the source (high covariance = high noise level). Once you show what both sources are reporting in terms of covariance it might rule out either way.

chased11 gravatar image chased11  ( 2023-02-20 22:11:34 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-02-19 19:56:11 -0600

Seen: 136 times

Last updated: Feb 20 '23