Rosanswers logo

Hi, I am currently trying to migrate to robot_localization. I am using IMU and odometry data for the ekf_localization_node. When running ekf_localization_node I get a tf error:

Error:   TF_NAN_INPUT: Ignoring transform for child_frame_id "base_footprint" from authority "unknown_publisher" because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan -nan)
         at line 240 in /tmp/binarydeb/ros-kinetic-tf2-0.5.15/src/buffer_core.cpp
Error:   TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "base_footprint" from authority "unknown_publisher" because of an invalid quaternion in the transform (-nan -nan -nan -nan)
         at line 253 in /tmp/binarydeb/ros-kinetic-tf2-0.5.15/src/buffer_core.cpp

Here is a Bagfile I made containing IMU and Odometry data. My cofing:

frequency: 30
sensor_timeout: 0.1
two_d_mode: false
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
debug: false
publish_tf: true
publish_acceleration: false
odom_frame: odom_combined            # Defaults to "odom" if unspecified
base_link_frame: base_footprint  # Defaults to "base_link" if unspecified
world_frame: odom_combined           # Defaults to the value of odom_frame if unspecified

odom0: odom
odom0_config: [true,  true,  false,
               false, false, true,
               true,  false, false,
               false, false, true,
               false, false, false]
odom0_queue_size: 2
odom0_nodelay: false
odom0_differential: true
odom0_relative: false
odom0_pose_rejection_threshold: 5
odom0_twist_rejection_threshold: 1

imu0: imu/data
imu0_config: [false, false, false,
              true,  true,  true,
              false, false, false,
              true,  true,  true,
              true,  true,  true]
imu0_nodelay: false
imu0_differential: true
imu0_relative: true
imu0_queue_size: 5
imu0_pose_rejection_threshold: 0.8                 # Note the difference in parameter names
imu0_twist_rejection_threshold: 0.8                #
imu0_linear_acceleration_rejection_threshold: 0.8  #
imu0_remove_gravitational_acceleration: true

Any chance someone can help me figure this out.

Originally posted by blasalat on ROS Answers with karma: 51 on 2017-04-29

Post score: 1

Original comments

Comment by Tom Moore on 2017-05-04:
Please post sample messages for each EKF input. Also, post any static transforms you are publishing.

Comment by ufr3c_tjc on 2017-05-15:
It seems like you haven't specified a map_frame parameter.

Comment by Tom Moore on 2017-07-25:
It defaults to map. Did you ever solve this? If so, can we close the question?


1 Answer 1


Rosanswers logo

Hi, sorry for responding so late. The error occurred due to nan values in my odom messages.

Originally posted by blasalat with karma: 51 on 2017-08-23

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Redhwan on 2019-05-15:
the same problem for me

please help me

thank you in advance


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.