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

Revision history [back]

Short answer: if you want it to look identical, change your configuration to this:

odom0_config: [true, true, false,
               false, false, true,
               false, false, false,
               false, false, false,
               false, false, false]

(Note that I left Z position as false because you have two_d_mode set to true). Note, however, that if you plan on fusing other sensors such as IMUs, then you want to continue to use velocities as you are, with one caveat (see below).

The long answer has a few possibilities:

  1. Your configuration has Y velocity set to true. If this is a nonholonomic UGV operating in 2D, then you should only have X velocity and yaw velocity set to true (you can't instantaneously move sideways, so you don't need Y).
  2. However, I find it strange that you get +Y velocity as you turn. In other words, your raw odometry data should never have positive Y velocity when it turns. Can you verify this in your bag data? Incidentally, what kind of robot is this?
  3. What do your covariances look like in your odometry messages?
  4. Regardless, the two may never line up perfectly: the EKF implementation in ekf_localization_node has its own motion model. At every time step, it's going to predict the next state, and then correct it using your sensor data. However, the filter has some trust in its own estimate, so when a measurement comes in, it may not fully accept it.