# Unit 4 - EKF and UKF - error in ukf\_filtering

**URL:** <https://get-help.theconstruct.ai/t/unit-4-ekf-and-ukf-error-in-ukf-filtering/22880>\
**Category:** Kalman Filters\
**Tags:** error, ros\
**Created:** [March 6, 2023, 12:52pm UTC](https://get-help.theconstruct.ai/t/unit-4-ekf-and-ukf-error-in-ukf-filtering/22880 "2023-03-06T12:52:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [March 6, 2023, 12:52pm UTC](https://get-help.theconstruct.ai/t/unit-4-ekf-and-ukf-error-in-ukf-filtering/22880/1 "2023-03-06T12:52:13Z")

</div>

Hi,

I am currently working on **Kalman Filters** course and on the section **4.11 Configuring the robot\_localization package**.

**Summary / TLDR:**  
Running `roslaunch ukf_filtering ukf_filtering.launch` produces this error:  
[FATAL] [1678106298.789320387, 2411.050000000]: Could not read sensor update configuration for topic odom0 (type: 7, expected: 7). Error was type error  
The error is confusing as expected type and provided type are the same.

==========

After configuring, building and running `ukf_filtering` package as stated in the course notes, I get the following error.

Webshell 1 Output (NO ERROR HERE):

```bash
user:~$ roslaunch ekf_ukf auxiliary_nodes.launch
... logging to /home/user/.ros/log/1b54c978-bc16-11ed-83d8-0242c0a8e007/roslaunch-4_xterm-8514.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://4_xterm:40635/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    noisy_odom_node (ekf_ukf/noisy_odom_republisher.py)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_urdf (gazebo_ros/spawn_model)

ROS_MASTER_URI=http://4_simulation:11311

process[spawn_urdf-1]: started with pid [8524]
process[robot_state_publisher-2]: started with pid [8525]
process[noisy_odom_node-3]: started with pid [8528]
[INFO] [1678106283.200705, 2395.606000]: Started noisy odometry publisher node
[spawn_urdf-1] process has finished cleanly
log file: /home/user/.ros/log/1b54c978-bc16-11ed-83d8-0242c0a8e007/spawn_urdf-1*.log

```

Webshell 2 Output (ERROR HERE):

```bash
user:~/catkin_ws$ roslaunch ukf_filtering ukf_filtering.launch
... logging to /home/user/.ros/log/1b54c978-bc16-11ed-83d8-0242c0a8e007/roslaunch-4_xterm-8599.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://4_xterm:35335/

SUMMARY
========

CLEAR PARAMETERS
 * /ukf_localization_node/

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /ukf_localization_node/base_link_frame: base_link
 * /ukf_localization_node/frequency: 50
 * /ukf_localization_node/imu0: /mobile_base/sens...
 * /ukf_localization_node/imu0_config: [False, False, Fa...
 * /ukf_localization_node/imu0_differential: False
 * /ukf_localization_node/initial_estimate_covariance: ['1e-9', 0, 0, 0,...
 * /ukf_localization_node/odom0: /odom_noisy
 * /ukf_localization_node/odom0_config: [False, False, 'f...
 * /ukf_localization_node/odom0_differential: False
 * /ukf_localization_node/odom_frame: odom
 * /ukf_localization_node/process_noise_covariance: [0.05, 0, 0, 0, 0...
 * /ukf_localization_node/publish_tf: False
 * /ukf_localization_node/two_d_mode: True
 * /ukf_localization_node/world_frame: odom

NODES
  /
    ukf_localization_node (robot_localization/ukf_localization_node)

ROS_MASTER_URI=http://4_simulation:11311

process[ukf_localization_node-1]: started with pid [8608]
[FATAL] [1678106298.789320387, 2411.050000000]: Could not read sensor update configuration for topic odom0 (type: 7, expected: 7). Error was type error

```

The error seems confusing to me as it says “type: 7 and expected: 7” and that there is a “type error”. If the expected type and provided type are the same (7 here), why do I get this error?

Thanks,  
Girish

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [March 6, 2023, 1:10pm UTC](https://get-help.theconstruct.ai/t/unit-4-ekf-and-ukf-error-in-ukf-filtering/22880/2 "2023-03-06T13:10:12Z")

</div>

Hi,

I have solved this problem.

The mistake was I did not have commas in the following lines:

```yaml
odom0_config: [false, false, false # missing comma here
               false, false, false # missing comma here
               true, true, false # missing comma here
               false, false, true # missing comma here
               false, false, false]

```

I did not pay attention to the commas there, which was my mistake.

I copy-pasted the above from the course notes:  
As you can see, there are no commas here.  
 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/2X/9/930c5efaeda5c6910faa8ab9714252f8e25ee465.png)

But the final file had the commas:  
 ![image](https://get-help.robotigniteacademy.com/uploads/default/original/2X/b/bf5f8d1741c4a40a701de24b768f4e51b68824e9.png)

So, to fix this problem, I just added the commas.

– Girish

---

<div class="post-metadata">

**Author:** ![rzegers](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/rzegers/32/7010_2.png) [@rzegers](https://get-help.theconstruct.ai/u/rzegers)\
**Post date:** [March 16, 2023, 8:44am UTC](https://get-help.theconstruct.ai/t/unit-4-ekf-and-ukf-error-in-ukf-filtering/22880/3 "2023-03-16T08:44:39Z")

</div>

Hello @girishkumar.kannan,

Thank you very much for reporting this, I have fixed this error by adding the missing commas.  
Corrected unit should be already online.

Regards,

Roberto
