Ask Your Question

ekf_localization: odometry/filtered topic:Frequency too low?

asked 2016-03-08 10:18:00 -0500

b2256 gravatar image

updated 2016-03-14 22:49:25 -0500

I am using robot_localization to fuse gps and imu referencing this Tom Moore answer:

My setup is the same with a full-size SUV vehicle, Beaglebone Black board, Phidgets imu w/mag, ublox gps, with no odometry sensors. I am running Ubuntu 14.04.4 LTS, deb 4.1.15-ti-rt-r40 armv7l, ros indigo, and robot_localization with the ekf filter.

I've been able to produce decent results, but the mobile trial awaits resolving issues, so everything is tested in the static position. I've calibrated the magnetometer for hard and soft iron on the vehicle and incorporate the factors in the driver. I use an overall launch file that separately calls the devices and robot_localization. REP's 103 and 105 were adhered to with the imu (as far as I can tell), since the raw mag points (X) east at zero and the other checks (Y and Z) work out. Declination is accounted for in the navsat_transform launch file.

The issue arises with the diagnostic output where this occurs:

level: 1 
  name: ekf_localization: odometry/filtered topic status 
  message: Frequency too low. 
  hardware_id: none 
      key: Events in window 
      value: 17 
      key: Events since startup   
      value: 172 
    key: Duration of window (s) 
    value: 16.443676 
      key: Actual frequency (Hz)  
      value: 1.033832 
      key: Minimum acceptable frequency (Hz) 
      value: 55.800000 
      key: Minimum acceptable frequency (Hz) 
      value: 72.600000

I've checked the frequencies of all the incoming topics and they all seem ok except for the /tf topic which also shows around 1 hz. The transform frames correctly seem to tie odom to base_link with child frames phid_imu and gps.

A secondary factor may be in play is the 0 yaw covariance factor produced by the Phidgets imu driver. I cannot seem to find where this can be adjusted to help convergence. The gps is running at 4hz(fortunately) so it will determine all gps inputs (ie. /odometry/gps).

I am asking how to resolve the low ekf_localization diagnostic issue and will likely have to ask another question about the yaw covariance in the Phidgets driver.

I've placed the diagnostic output, device output, launch files, node graph, and transform tree on Dropbox

Any ideas towards this end? Please forgive the text formatting.

Regards and Thank you,


EDIT 03/10/16 Per Tom Moore's comment below, I did perform the ekf/imu test and found that if the data rate value in the imu was slowed to 40ms, the frequencies of /odometry/filtered and /tf were helped. I then implemented the full launch with the same result although it takes a few minutes to stabilize. Will these values at 25 hz be sufficient for operation? Additional tweaks involved reducing the ekf data rate to 28 hz hoping to stabilize (with limited success at ~25.6 hz, std dev 0.0155s, and max of 0.353s). Note that these results were via ssh (from a Windows laptop) into the ...

edit retag flag offensive close merge delete


Why is tf publishing at 1 Hz? The filter is going to look up transforms from the frame_ids of your sensor inputs to the frame_id of your world or base_link frames. Also, can you please post sample messages for each input?

Tom Moore gravatar image Tom Moore  ( 2016-03-08 12:13:57 -0500 )edit

Tom, I do not have any idea why tf is at 1 Hz. Nor where I might find the params? The sensor inputs are included in the 030716_diagnostics.odt file from the Dropbox link. The node diagram as well as the transform tree are there as well. Any advice would be greatly appreciated.

b2256 gravatar image b2256  ( 2016-03-08 12:34:56 -0500 )edit

Can you try stripping out everything from the launch file and starting with one sensor alone?

Tom Moore gravatar image Tom Moore  ( 2016-03-08 12:51:39 -0500 )edit

Yes. Should I start with just the imu.launch? That is where the call for the madgwick (pre)filter (imu_filter_madgwick/ImuFilterNodelet) is setup. I expect that it will be not until early this evening before I can get back to it (at work.) Thank you in advance for an ongoing dialog.

b2256 gravatar image b2256  ( 2016-03-08 13:10:20 -0500 )edit

No problem. Which sensor you use first is irrelevant; what matters is that you run with just one sensor and see if the behavior improves. I'm just trying to troubleshoot sensors.

Tom Moore gravatar image Tom Moore  ( 2016-03-08 13:32:33 -0500 )edit

I've now tried imu only and gps only; both work as expected. When the ekf and navsat are added topics /gps/filtered and /tf go to around 1 hz. I've also tried on a desktop as opposed to the BBB, and frequencies are excellent. An intermittent imu connection problem also fixed. More on Dropbox link

b2256 gravatar image b2256  ( 2016-03-09 07:54:40 -0500 )edit

No, sorry, what I meant was run the EKF with, for example, just the IMU as input. Don't run navsat_transform_node. Strange that it runs on the desktop. Are you building from source?

Tom Moore gravatar image Tom Moore  ( 2016-03-09 18:40:25 -0500 )edit

No, not from source but it did work. See edit above for continuation.

b2256 gravatar image b2256  ( 2016-03-10 11:39:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-17 00:07:03 -0500

b2256 gravatar image

With Tom's (Moore) help, I've discovered that the answer lies in two elements: 1) for BeagleBone Black, there is a cpu frequency governor. Make sure the maximum cpu is utilized unless you're using battery power. It turns out that the default may be as low as 300 mHz... not enough. Raise it to your comfort level. Here is the source I used: 2) Arriving at optimal imu input frequency vs ekf_localization frequency (also navsat) is by trial and error. Proceed until you can reduce the cpu load and increase the frequency of the output node (in my case, /odometry/filtered) to a stable compromise.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-03-08 10:18:00 -0500

Seen: 1,434 times

Last updated: Mar 17 '16