Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy between setting first value of covariance to -1 and disabling orientation parameters in IMU configuration #860

Open
mjpc13 opened this issue Jan 10, 2024 · 4 comments

Comments

@mjpc13
Copy link

mjpc13 commented Jan 10, 2024

I have observed a discrepancy between two approaches in configuring robot_localization. When setting the first value of the covariance of a sensor_msgs/Imu message to -1 (which should neglect the orientation measurement), and alternatively, when disabling the orientation parameters in the configuration file.

From my understanding, shouldn't these two approaches be equal?

my launch file (with covariance having the -1):

imu0: "/imu_corrected" 

imu0_config:
  [
    false, #x
    false, #y
    false, #z
    true, #roll
    true, #pitch
    true, #yaw
    false, #velocity x
    false, #velocity y
    false, #velocity z
    false, #velocity roll
    false, #velocity pitch
    false, #velocity yaw
    true, #acceleration x
    false, #acceleration y
    true #acceleration z
  ] 

imu0_differential: false
imu0_relative: false
imu0_remove_gravitational_acceleration: true

odom0: "/odometry/icp/back"
#The order of the values is x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw, ax, ay, az.
odom0_config:
  [
    false,
    false,
    false,
    false,
    false,
    false,
    true,
    true,
    true,
    true,
    true,
    true,
    false,
    false,
    false
  ]

odom0_differential: true
odom0_relative: false

my launch file (with non -1 covariances):

imu0: "/imu_raw" 

imu0_config:
  [
    false, #x
    false, #y
    false, #z
    false, #roll
    false, #pitch
    false, #yaw
    false, #velocity x
    false, #velocity y
    false, #velocity z
    false, #velocity roll
    false, #velocity pitch
    false, #velocity yaw
    true, #acceleration x
    false, #acceleration y
    true #acceleration z
  ] 

imu0_differential: false
imu0_relative: false
imu0_remove_gravitational_acceleration: true

[...]

I am running ROS noetic.

@ayrton04
Copy link
Collaborator

Can you explain what discrepancy you are observing? You said the approaches are not equal, but didn't provide an example of what makes you say so.

@mjpc13 mjpc13 changed the title Difference between Discrepancy between setting first odometry covariance to -1 and disabling orientation parameters in IMU configuration Jan 10, 2024
@mjpc13 mjpc13 changed the title Discrepancy between setting first odometry covariance to -1 and disabling orientation parameters in IMU configuration Discrepancy between setting first value of covariance to -1 and disabling orientation parameters in IMU configuration Jan 10, 2024
@mjpc13
Copy link
Author

mjpc13 commented Jan 10, 2024

Results from evo tool

Setting the first covariance value to -1:
rl_covariance_-1

Setting the orientations in the config to false:
rl_orientation_false

My question is, why is there a difference between the 2 results? Neither configuration should use the orientations, right?

Perhaps one configuration utilizes orientations to remove the gravity vector, while the other does not?

@davidbsp
Copy link

Hi @ayrton04, would you expect there to be a difference by design in these 2 situations?

@ayrton04
Copy link
Collaborator

I would expect them to behave the same, but I don't have the cycles to investigate why they're not. We'll soon be deprecating this package in favour of fuse, so while I will accept a PR to correct any errant behaviour, I won't be addressing issues unless they are severe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants