Unit 2: Merging Sensor Data - the circule ekf convergence doesn't match the tutorial's output

My unit 2 ekf convergence on rviz doesn’t match the tutorial’s solution. My turtle robot on the rviz simulator doesn’t move in circle when commanded by publishing to the cmd_vel topic. But the odometry shows that the robot is in circular motion and when the ekf is initialised the filtered output matches what is expected but my noisy_odom does not. See the images below to see what I mean.

Below is my output from my rviz. You can see that the filtered output matches the circular trajectory the robot is following but the noisy_odom does not nor is my robot moving in a circular trajectory in rviz.

Here is my code if that helps.

#Configuation for robot odometry EKF

#

frequency: 50

    

two_d_mode: true

    

publish_tf: false

# Complete the frames section 

odom_frame: odom

base_link_frame: base_link

world_frame: base_link

map_frame: map

# Complete the odom0 configuration

odom0: /noisy_odom

odom0_config: [false, false, false,

               false, false, false,

               true, true, false,

               false, false, true,

               false, false, false]

odom0_differential: false

# Complete the imu0 configuration

imu0: /imu/data

imu0_config: [false, false, false,

              false, false, 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,    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,    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,    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,     0,     0,     0,    1e-9, 0,

                                                      0,    0,    0,    0,    0,    0,    0,    0,    0,    0,     0,     0,     0,    0,    1e-9]

I have tried restarting my rviz as well as restarting my simulation all together but the output doesn’t seem to change. I am still at a beginner level with ROS so any help would be greatly appreciated :slight_smile:

Hello @Has22 ,

You shouldn’t be using the map_frame here, since you are not using any external map. Also, make sure that the Fixed Frame in Rviz is set to odom. Let me know if this fixes your problem.

Best,